def _find_table_name_for_column(column_name, tables, table_schemas):
  """Returns table name for column or None if cannot find."""
  table_names_to_columns = {
      table.table_name: table.column_names for table in table_schemas
  }
  for table in tables:
    if table.table_name not in table_names_to_columns:
      raise ParseError('Table name %s not found in schema.' % table.table_name)
    if column_name in table_names_to_columns[table.table_name]:
      return table.table_name
  return None
Returns table name for column or None if cannot find.
language/xsp/data_preprocessing/abstract_sql.py