original_docstring: Return values from child data that exist in the foreign_subquery transformed into foreign key values
  
      This function performs the same query as values_to_foreign_key() except it can take a subquery, which has
      different syntax, as input rather than a table. The function presumes child_data has already been modified if
      necessary. NOTE: this does not support multi-column conversions of child_data to foreign key.
  
      Args:
          foreign_subquery: A subquery which is an Alias class in sqlalchemy. These classes are created when subquery()
          is appended to a sqlalchemy query statement
          foreign_key: The name of the column containing foreign key values
          foreign_value: The name of the column containing values to match with child data
          child_data: A list of data with values contained in foreign value
  
      Returns:
           A conversion dict that maps child_data to foreign keys
      
docstring: Return values from child data that exist in the foreign_subquery transformed into foreign key values
  This function performs the same query as values_to_foreign_key() except it can take a subquery, which has
  different syntax, as input rather than a table. The function presumes child_data has already been modified if
  necessary. NOTE: this does not support multi-column conversions of child_data to foreign key.
  
  A subquery which is an Alias class in sqlalchemy. These classes are created when subquery()
  is appended to a sqlalchemy query statement
  foreign_key: The name of the column containing foreign key values
  foreign_value: The name of the column containing values to match with child data
  child_data: A list of data with values contained in foreign value
  
  A conversion dict that maps child_data to foreign keys
docstring_tokens: Return values from child data that exist in the foreign_subquery transformed into foreign key values This function performs the same query as values_to_foreign_key () except it can take a subquery which has different syntax as input rather than a table . The function presumes child_data has already been modified if necessary . NOTE : this does not support multi - column conversions of child_data to foreign key . A subquery which is an Alias class in sqlalchemy . These classes are created when subquery () is appended to a sqlalchemy query statement foreign_key : The name of the column containing foreign key values foreign_value : The name of the column containing values to match with child data child_data : A list of data with values contained in foreign value A conversion dict that maps child_data to foreign keys
code: def _values_to_foreign_key(session, foreign_subquery, foreign_key, foreign_value, child_data):
      """Return values from child data that exist in the foreign_subquery transformed into foreign key values
  
      This function performs the same query as values_to_foreign_key() except it can take a subquery, which has
      different syntax, as input rather than a table. The function presumes child_data has already been modified if
      necessary. NOTE: this does not support multi-column conversions of child_data to foreign key.
  
      Args:
          foreign_subquery: A subquery which is an Alias class in sqlalchemy. These classes are created when subquery()
          is appended to a sqlalchemy query statement
          foreign_key: The name of the column containing foreign key values
          foreign_value: The name of the column containing values to match with child data
          child_data: A list of data with values contained in foreign value
  
      Returns:
           A conversion dict that maps child_data to foreign keys
      """
      rows = session.query(getattr(foreign_subquery.c, foreign_key), getattr(foreign_subquery.c, foreign_value)). \
          filter(getattr(foreign_subquery.c, foreign_value).in_(child_data)).all()
      conversion_dict = {getattr(row, foreign_value): getattr(row, foreign_key) for row in rows}
      return conversion_dict
code_tokens: def _values_to_foreign_key ( session , foreign_subquery , foreign_key , foreign_value , child_data ) : rows = session . query ( getattr ( foreign_subquery . c , foreign_key ) , getattr ( foreign_subquery . c , foreign_value ) ) . filter ( getattr ( foreign_subquery . c , foreign_value ) . in_ ( child_data ) ) . all ( ) conversion_dict = { getattr ( row , foreign_value ) : getattr ( row , foreign_key ) for row in rows } return conversion_dict
short_docstring: Return values from child data that exist in the foreign_subquery transformed into foreign key values
  This function performs the same query as values_to_foreign_key() except it can take a subquery, which has
  different syntax, as input rather than a table.
short_docstring_tokens: Return values from child data that exist in the foreign_subquery transformed into foreign key values This function performs the same query as values_to_foreign_key () except it can take a subquery which has different syntax as input rather than a table .
comment: """Return values from child data that exist in the foreign_subquery transformed into foreign key values
  
      This function performs the same query as values_to_foreign_key() except it can take a subquery, which has
      different syntax, as input rather than a table. The function presumes child_data has already been modified if
      necessary. NOTE: this does not support multi-column conversions of child_data to foreign key.
  
      Args:
          foreign_subquery: A subquery which is an Alias class in sqlalchemy. These classes are created when subquery()
          is appended to a sqlalchemy query statement
          foreign_key: The name of the column containing foreign key values
          foreign_value: The name of the column containing values to match with child data
          child_data: A list of data with values contained in foreign value
  
      Returns:
           A conversion dict that maps child_data to foreign keys
      """