def create_foreign_key(kind, key_is_id=False):
 def generate_foreign_key_lambda(value):
  if key_is_id:
   value = int(value)
  return datastore.Key.from_path(kind, value)
 return generate_foreign_key_lambda

def create_foreign_key ( kind , key_is_id = False ) : def generate_foreign_key_lambda ( value ) : if key_is_id : value = int ( value ) return datastore . Key . from_path ( kind , value ) return generate_foreign_key_lambda
a method to make one-level key objects .