code: def from_rfc3339(rfc3339_text, with_nanos=False):
      
      timestamp = strict_rfc3339.rfc3339_to_timestamp(rfc3339_text)
      result = datetime.datetime.utcfromtimestamp(timestamp)
      if with_nanos:
          return (result, int((timestamp - int(timestamp)) * 1e9))
      else:
          return result
docs: Parse a RFC 3339 date string format to datetime.date.
  
      Example of accepted format: '1972-01-01T10:00:20.021-05:00'
  
      - By default, the result is a datetime.datetime
      - If with_nanos is true, the result is a 2-tuple, (datetime.datetime,
      nanos), where the second field represents the possible nanosecond
      resolution component of the second field.
  
      Args:
        rfc3339_text (string): An rfc3339 formatted date string
        with_nanos (bool): Determines if nanoseconds should be parsed from the
          string
  
      Raises:
        ValueError: if ``rfc3339_text`` is invalid
  
      Returns:
        :class:`datetime.datetime`: when with_nanos is False
        tuple(:class:`datetime.datetime`, int): when with_nanos is True