parameters: (cls, data_string, format="%a %b %d %H:%M:%S %Y")
return_statement: return cls(*args)
docstring: Return a class cls instance based on the input string and the
      format string.
docstring_summary: Return a class cls instance based on the input string and the
      format string.
docstring_tokens: Return a class cls instance based on the input string and the format string .
function: def _strptime_datetime(cls, data_string, format="%a %b %d %H:%M:%S %Y"):
      """Return a class cls instance based on the input string and the
      format string."""
      tt, fraction, gmtoff_fraction = _strptime(data_string, format)
      tzname, gmtoff = tt[-2:]
      args = tt[:6] + (fraction,)
      if gmtoff is not None:
          tzdelta = datetime_timedelta(seconds=gmtoff, microseconds=gmtoff_fraction)
          if tzname:
              tz = datetime_timezone(tzdelta, tzname)
          else:
              tz = datetime_timezone(tzdelta)
          args += (tz,)
  
      return cls(*args)
function_tokens: def _strptime_datetime ( cls , data_string , format = "%a %b %d %H:%M:%S %Y" ) : tt , fraction , gmtoff_fraction = _strptime ( data_string , format ) tzname , gmtoff = tt [ - 2 : ] args = tt [ : 6 ] + ( fraction , ) if gmtoff is not None : tzdelta = datetime_timedelta ( seconds = gmtoff , microseconds = gmtoff_fraction ) if tzname : tz = datetime_timezone ( tzdelta , tzname ) else : tz = datetime_timezone ( tzdelta ) args += ( tz , ) return cls ( * args )