def _entity_schema_to_prospective_search_schema(schema, add_entry):
 all_names = []
 for (python_type, names) in schema.items():
  all_names.extend(names)
  for name in names:
   model_type = _GetModelTypeForEntityType(python_type)
   if (not model_type):
    continue
   _add_schema_entry(model_type, name, add_entry)
 if (len(all_names) != len(set(all_names))):
  duplicate_names = all_names
  for name in set(all_names):
   duplicate_names.remove(name)
  raise SchemaError(('Duplicate names in schema: %s' % duplicate_names))

def _entity_schema_to_prospective_search_schema ( schema , add_entry ) : all_names = [ ] for ( python_type , names ) in schema . items ( ) : all_names . extend ( names ) for name in names : model_type = _GetModelTypeForEntityType ( python_type ) if ( not model_type ) : continue _add_schema_entry ( model_type , name , add_entry ) if ( len ( all_names ) != len ( set ( all_names ) ) ) : duplicate_names = all_names for name in set ( all_names ) : duplicate_names . remove ( name ) raise SchemaError ( ( 'Duplicate names in schema: %s' % duplicate_names ) )
produce schemaentries from python schema .