code: def _parse(self, fd):  # type: (...) -> Timezone
          
          hdr = self._parse_header(fd)
  
          if hdr.version in (2, 3):
              # We're skipping the entire v1 file since
              # at least the same data will be found in TZFile 2.
              fd.seek(
                  hdr.transitions * 5
                  + hdr.types * 6
                  + hdr.abbr_size
                  + hdr.leaps * 4
                  + hdr.stdwalls
                  + hdr.utclocals,
                  1,
              )
  
              # Parse the second header
              hdr = self._parse_header(fd)
  
              if hdr.version != 2 and hdr.version != 3:
                  raise InvalidZoneinfoFile(
                      "Header versions mismatch for file {}".format(fd.name)
                  )
  
              # Parse the v2 data
              trans = self._parse_trans_64(fd, hdr.transitions)
              type_idx = self._parse_type_idx(fd, hdr.transitions)
              types = self._parse_types(fd, hdr.types)
              abbrs = self._parse_abbrs(fd, hdr.abbr_size, types)
  
              fd.seek(hdr.leaps * 8 + hdr.stdwalls + hdr.utclocals, 1)
  
              trule = self._parse_posix_tz(fd)
          else:
              # TZFile v1
              trans = self._parse_trans_32(fd, hdr.transitions)
              type_idx = self._parse_type_idx(fd, hdr.transitions)
              types = self._parse_types(fd, hdr.types)
              abbrs = self._parse_abbrs(fd, hdr.abbr_size, types)
              trule = None
  
          types = [
              TransitionType(off, is_dst, abbrs[abbr]) for off, is_dst, abbr in types
          ]
  
          transitions = []
          previous = None
          for trans, idx in zip(trans, type_idx):
              transition = Transition(trans, types[idx], previous)
              transitions.append(transition)
  
              previous = transition
  
          if not transitions:
              transitions.append(Transition(0, types[0], None))
  
          return Timezone(transitions, posix_rule=trule, extended=self._extend)
docs: Parse a zoneinfo file.