def _get_index_name_by_column(table, column_name):
 protected_name = metadata.protect_name(column_name)
 possible_index_values = [protected_name, ('values(%s)' % protected_name)]
 for index_metadata in table.indexes.values():
  options = dict(index_metadata.index_options)
  if (options.get('target') in possible_index_values):
   return index_metadata.name

def _get_index_name_by_column ( table , column_name ) : protected_name = metadata . protect_name ( column_name ) possible_index_values = [ protected_name , ( 'values(%s)' % protected_name ) ] for index_metadata in table . indexes . values ( ) : options = dict ( index_metadata . index_options ) if ( options . get ( 'target' ) in possible_index_values ) : return index_metadata . name
find the index name for a given table and column .