code: def __init__(self, zonefile_stream=None):
      if zonefile_stream is not None:
          with TarFile.open(fileobj=zonefile_stream) as tf:
              self.zones = {
                  zf.name: tzfile(tf.extractfile(zf), filename=zf.name)
                  for zf in tf.getmembers()
                  if zf.isfile() and zf.name != METADATA_FN
              }
              # deal with links: They'll point to their parent object. Less
              # waste of memory
              links = {
                  zl.name: self.zones[zl.linkname]
                  for zl in tf.getmembers()
                  if zl.islnk() or zl.issym()
              }
              self.zones.update(links)
              try:
                  metadata_json = tf.extractfile(
                      tf.getmember(METADATA_FN)
                  )
                  metadata_str = metadata_json.read().decode("UTF-8")
                  self.metadata = json.loads(metadata_str)
              except KeyError:
                  # no metadata in tar file
                  self.metadata = None
      else:
          self.zones = {}
          self.metadata = None
  
file_path: catboost/contrib/python/python-dateutil/py3/dateutil/zoneinfo/__init__.py
imports: import warnings
  import json
  from tarfile import TarFile
  from pkgutil import get_data
  from io import BytesIO
  from dateutil.tz import tzfile
label_desc: Use image node_id 1 to create a new ZoneInfoFile object from inherited base classes: object with example: obj = ZoneInfoFile(zonefile_stream)