code: def parse_date(value):
      
      if not value:
          return None
  
      if isinstance(value, datetime.date):
          return value
  
      return parse_datetime(value).date()
docs: Attempts to parse `value` into an instance of ``datetime.date``. If
      `value` is ``None``, this function will return ``None``.
  
      Args:
          value: A timestamp. This can be a string, datetime.date, or
              datetime.datetime value.