def _DedupingEntityGenerator(cursor):
 seen = set()
 for row in cursor:
  (row_key, row_entity) = row[:2]
  encoded_row_key = str(row_key)
  if (encoded_row_key in seen):
   continue
  seen.add(encoded_row_key)
  entity = entity_pb.EntityProto(row_entity)
  datastore_stub_util.PrepareSpecialPropertiesForLoad(entity)
  (yield entity)

def _DedupingEntityGenerator ( cursor ) : seen = set ( ) for row in cursor : ( row_key , row_entity ) = row [ : 2 ] encoded_row_key = str ( row_key ) if ( encoded_row_key in seen ) : continue seen . add ( encoded_row_key ) entity = entity_pb . EntityProto ( row_entity ) datastore_stub_util . PrepareSpecialPropertiesForLoad ( entity ) ( yield entity )
generator that removes duplicate entities from the results .