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