@staticmethod<EOL><INDENT>def get_metar(<EOL>metar: typing.Union[str, '<STR_LIT>']<EOL>) -> typing.Tuple[typing.Union[str, None], typing.Union['<STR_LIT>', None]]:<DEDENT>
error: typing.Optional[str] = None<EOL>if isinstance(metar, CustomMetar):<EOL><INDENT>return None, metar<EOL><DEDENT>if isinstance(metar, str):<EOL><INDENT>LOGGER.debug('<STR_LIT>', metar)<EOL>if len(metar) == <NUM_LIT:4>:<EOL><INDENT>LOGGER.debug('<STR_LIT>')<EOL>metar = AWC.query_icao(metar).raw_metar<EOL><DEDENT><DEDENT>else:<EOL><INDENT>error = f'<STR_LIT>'<EOL><DEDENT>if error:<EOL><INDENT>return error, None<EOL><DEDENT>try:<EOL><INDENT>return None, CustomMetar(metar_code=metar)<EOL><DEDENT>except ParserError:<EOL><INDENT>return f'<STR_LIT>', None<EOL><DEDENT>
Builds a CustomMetar object from a CustomMetar object (returns it), an ICAO code or a METAR string

Args:
    metar: CustomMetar object, ICAO string or METAR string

Returns: CustomMetar object