def build_query_dict(results):
    # type: (Sequence[Sequence[Any]]) -> List[Dict[str, Any]]
    '''Builds a list of dictionaries from the results of a query.'''
    return [{field: value for field, value in zip(QUERY_FIELDS, row)} for row in results]
Builds a list of dictionaries from the results of a query.
scripts/query_db.py