def parse_field(field: str) -> Tuple[str, Optional[str]]:
_field = field.split('<STR_LIT:.>')<EOL>_field = [f.strip() for f in _field]<EOL>if len(_field) == <NUM_LIT:1> and _field[<NUM_LIT:0>]:<EOL><INDENT>return _field[<NUM_LIT:0>], None<EOL><DEDENT>elif len(_field) == <NUM_LIT:2> and _field[<NUM_LIT:0>] and _field[<NUM_LIT:1>]:<EOL><INDENT>return _field[<NUM_LIT:0>], _field[<NUM_LIT:1>]<EOL><DEDENT>raise QueryParserException('<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'.format(field))<EOL>
Parses fields with underscores, and return field and suffix.

    Example:
        foo => foo, None
        metric.foo => metric, foo