def parse_field(field: str) -> Tuple[str, Optional[str]]:
    """Parses fields with underscores, and return field and suffix.

    Example:
        foo => foo, None
        metric.foo => metric, foo
    """
    _field = field.split('.')
    _field = [f.strip() for f in _field]
    if len(_field) == 1 and _field[0]:
        return _field[0], None
    elif len(_field) == 2 and _field[0] and _field[1]:
        return _field[0], _field[1]
    raise QueryParserException('Query field must be either a single value,'
                               'possibly with single underscores, '
                               'or a prefix double underscore field. '
                               'Received `{}`'.format(field))
Parses fields with underscores, and return field and suffix.

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