def PackKey(name, value, pbvalue):
 ref = value._Key__reference
 pbvalue.mutable_referencevalue().set_app(ref.app())
 SetNamespace(pbvalue.mutable_referencevalue(), ref.name_space())
 for elem in ref.path().element_list():
  pbvalue.mutable_referencevalue().add_pathelement().CopyFrom(elem)

def PackKey ( name , value , pbvalue ) : ref = value . _Key__reference pbvalue . mutable_referencevalue ( ) . set_app ( ref . app ( ) ) SetNamespace ( pbvalue . mutable_referencevalue ( ) , ref . name_space ( ) ) for elem in ref . path ( ) . element_list ( ) : pbvalue . mutable_referencevalue ( ) . add_pathelement ( ) . CopyFrom ( elem )
packs a reference property into a entity_pb .