def _GetGroupByKey(entity, property_names):
 return frozenset(((prop.name(), prop.value().SerializeToString()) for prop in entity.property_list() if (prop.name() in property_names)))

def _GetGroupByKey ( entity , property_names ) : return frozenset ( ( ( prop . name ( ) , prop . value ( ) . SerializeToString ( ) ) for prop in entity . property_list ( ) if ( prop . name ( ) in property_names ) ) )
computes a key value that uniquely identifies the group of an entity .