def _fetch_all_datastore_entities():
 all_entities = []
 for namespace in datastore.Query('__namespace__').Run():
  namespace_name = namespace.key().name()
  for kind in datastore.Query('__kind__', namespace=namespace_name).Run():
   all_entities.extend(datastore.Query(kind.key().name(), namespace=namespace_name).Run())
 return all_entities

def _fetch_all_datastore_entities ( ) : all_entities = [ ] for namespace in datastore . Query ( '__namespace__' ) . Run ( ) : namespace_name = namespace . key ( ) . name ( ) for kind in datastore . Query ( '__kind__' , namespace = namespace_name ) . Run ( ) : all_entities . extend ( datastore . Query ( kind . key ( ) . name ( ) , namespace = namespace_name ) . Run ( ) ) return all_entities
returns all datastore entities from all namespaces as a list .