Move _ConstructReference() function to before _ReferenceFromPairs().
Move _ConstructReference() function to before _ReferenceFromPairs().

GoogleCloudPlatform/datastore-ndb-python,GoogleCloudPlatform/datastore-ndb-python