nodes: 0, module; 1, function_definition; 2, function_name:fetch_all_first_values; 3, parameters; 4, type; 5, block; 6, typed_parameter; 7, typed_parameter; 8, generic_type; 9, expression_statement; 10, expression_statement; 11, comment:# type: ResultProxy; 12, try_statement; 13, identifier:session; 14, type; 15, identifier:select_statement; 16, type; 17, identifier:List; 18, type_parameter; 19, comment:"""
      Returns a list of the first values in each row returned by a ``SELECT``
      query.
  
      A Core version of this sort of thing:
      http://xion.io/post/code/sqlalchemy-query-values.html
  
      Args:
          session: SQLAlchemy :class:`Session` object
          select_statement: SQLAlchemy :class:`Select` object
  
      Returns:
          a list of the first value of each result row
  
      """; 20, assignment; 21, block; 22, except_clause; 23, identifier:Session; 24, identifier:Select; 25, type; 26, identifier:rows; 27, call; 28, return_statement; 29, as_pattern; 30, block; 31, identifier:Any; 32, attribute; 33, argument_list; 34, list_comprehension; 35, identifier:ValueError; 36, as_pattern_target; 37, raise_statement; 38, identifier:session; 39, identifier:execute; 40, identifier:select_statement; 41, subscript; 42, for_in_clause; 43, identifier:e; 44, call; 45, identifier:row; 46, integer:0; 47, identifier:row; 48, identifier:rows; 49, identifier:MultipleResultsFound; 50, argument_list; 51, call; 52, identifier:str; 53, argument_list; 54, identifier:e
code: def fetch_all_first_values(session: Session,
                             select_statement: Select) -> List[Any]:
      """
      Returns a list of the first values in each row returned by a ``SELECT``
      query.
  
      A Core version of this sort of thing:
      http://xion.io/post/code/sqlalchemy-query-values.html
  
      Args:
          session: SQLAlchemy :class:`Session` object
          select_statement: SQLAlchemy :class:`Select` object
  
      Returns:
          a list of the first value of each result row
  
      """
      rows = session.execute(select_statement)  # type: ResultProxy
      try:
          return [row[0] for row in rows]
      except ValueError as e:
          raise MultipleResultsFound(str(e))