def _date_to_datetime(value):
if not isinstance(value, datetime.date):<EOL><INDENT>raise TypeError('<STR_LIT>'<EOL>'<STR_LIT>' % value)<EOL><DEDENT>return datetime.datetime(value.year, value.month, value.day)<EOL>
Convert a date to a datetime for Cloud Datastore storage.

    Args:
      value: A datetime.date object.

    Returns:
      A datetime object with time set to 0:00.