code: def fromfile(cls, fileobj):
      if fileobj.read(4).decode() != "TZif":
          raise ValueError("not a zoneinfo file")
      fileobj.seek(20)
      header = fileobj.read(24)
      tzh = (
          tzh_ttisgmtcnt,
          tzh_ttisstdcnt,
          tzh_leapcnt,
          tzh_timecnt,
          tzh_typecnt,
          tzh_charcnt,
      ) = struct.unpack(">6l", header)
      transitions = array("i")
      transitions.fromfile(fileobj, tzh_timecnt)
      if sys.byteorder != "big":
          transitions.byteswap()
  
      type_indices = array("B")
      type_indices.fromfile(fileobj, tzh_timecnt)
  
      ttis = []
      for i in range(tzh_typecnt):
          ttis.append(
              ttinfo._make(struct.unpack(">lbb", fileobj.read(6)))
          )
  
      abbrs = fileobj.read(tzh_charcnt)
  
      self = cls(transitions, type_indices, ttis, abbrs)
      self.tzh = tzh
  
      return self
  
file_path: cpython/Tools/tz/zdump.py
imports: import sys
  import os
  import struct
  from array import array
  from collections import namedtuple
  from datetime import datetime
label_desc: Use image node_id 2 for calling the TZInfo obj's underlying member method code with example usage: obj.fromfile(cls, fileobj) and returns: self