def _normalize_query_parameter(value):



  if isinstance(value, Model):
    value = value.key()

  if (isinstance(value, datetime.date) and
      not isinstance(value, datetime.datetime)):
    value = _date_to_datetime(value)
  elif isinstance(value, datetime.time):
    value = _time_to_datetime(value)
  return value
Make any necessary type conversions to a query parameter.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/db/__init__.py/_normalize_query_parameter