code: 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)
  
imports: import time
  import locale
  import calendar
  from re import compile
  from re import IGNORECASE
  from re import escape
  from datetime import date, timedelta, timezone
  from _thread import allocate_lock
label_desc: Use image node_id 5 for calling a global function with example usage: _strptime_datetime(cls, data_string, format) and returns: cls