def _split_proto_line(line, allowed):
    if not line:
        fields = [None]
    else:
        fields = line.rstrip('\n').split(' ', 1)
    command = fields[0]
    if allowed is not None and command not in allowed:
        raise UnexpectedCommandError(command)
    try:
        if len(fields) == 1 and command in ('done', None):
            return (command, None)
        elif len(fields) == 2 and command in ('want', 'have'):
            hex_to_sha(fields[1])
            return tuple(fields)
    except (TypeError, AssertionError), e:
        raise GitProtocolError(e)
    raise GitProtocolError('Received invalid line from client: %s' % line)
Retrieve the schema of a query by job id.
dataset/ETHPy150Open natestedman/Observatory/observatory/lib/dulwich/server.py/_split_proto_line--crossover with--dataset/ETHPy150Open tylertreat/BigQuery-Python/bigquery/client.py/BigQueryClient.get_query_schema