docs: def create_timezone(tz, first_date=None, last_date=None):
      """
      create an icalendar vtimezone from a pytz.tzinfo object
  
      :param tz: the timezone
      :type tz: pytz.tzinfo
      :param first_date: the very first datetime that needs to be included in the
      transition times, typically the DTSTART value of the (first recurring)
      event
      :type first_date: datetime.datetime
      :param last_date: the last datetime that needs to included, typically the
      end of the (very last) event (of a recursion set)
      :returns: timezone information
      :rtype: icalendar.Timezone()
  
      we currently have a problem here:
  
         pytz.timezones only carry the absolute dates of time zone transitions,
         not their RRULEs. This will a) make for rather bloated VTIMEZONE
         components, especially for long recurring events, b) we'll need to
         specify for which time range this VTIMEZONE should be generated and c)
         will not be valid for recurring events that go into eternity.
  
      Possible Solutions:
  
      As this information is not provided by pytz at all, there is no
      easy solution, we'd really need to ship another version of the OLSON DB.
  
      """
      if isinstance(tz, pytz.tzinfo.StaticTzInfo):
          return _create_timezone_static(tz)
  
      # TODO last_date = None, recurring to infinity
  
      first_date = dt.datetime.today() if not first_date else to_naive_utc(first_date)
      last_date = dt.datetime.today() if not last_date else to_naive_utc(last_date)
      timezone = icalendar.Timezone()
      timezone.add('TZID', tz)
  
      # This is not a reliable way of determining if a transition is for
      # daylight savings.
      # From 1927 to 1941 New Zealand had GMT+11:30 (NZ Mean Time) as standard
      # and GMT+12:00 (NZ Summer Time) as daylight savings time.
      # From 1941 GMT+12:00 (NZ Standard Time) became standard time.
      # So NZST (NZ Summer/Standard Time) can refer to standard or daylight
      # savings time.  And this code depends on the random order the _tzinfos
      # are returned.
      # dst = {
      #     one[2]: 'DST' in two.__repr__()
      #     for one, two in iter(tz._tzinfos.items())
      # }
      # bst = {
      #     one[2]: 'BST' in two.__repr__()
      #     for one, two in iter(tz._tzinfos.items())
      # }
      # ...
      #   if dst[name] or bst[name]:
  
      # looking for the first and last transition time we need to include
      first_num, last_num = 0, len(tz._utc_transition_times) - 1
      first_tt = tz._utc_transition_times[0]
      last_tt = tz._utc_transition_times[-1]
      for num, transtime in enumerate(tz._utc_transition_times):
          if transtime > first_tt and transtime < first_date:
              first_num = num
              first_tt = transtime
          if transtime < last_tt and transtime > last_date:
              last_num = num
              last_tt = transtime
  
      timezones = dict()
      for num in range(first_num, last_num + 1):
          name = tz._transition_info[num][2]
          if name in timezones:
              ttime = tz.fromutc(tz._utc_transition_times[num]).replace(tzinfo=None)
              if 'RDATE' in timezones[name]:
                  timezones[name]['RDATE'].dts.append(
                      icalendar.prop.vDDDTypes(ttime))
              else:
                  timezones[name].add('RDATE', ttime)
              continue
  
          if tz._transition_info[num][1]:
              subcomp = icalendar.TimezoneDaylight()
          else:
              subcomp = icalendar.TimezoneStandard()
  
          subcomp.add('TZNAME', tz._transition_info[num][2])
          subcomp.add(
              'DTSTART',
              tz.fromutc(tz._utc_transition_times[num]).replace(tzinfo=None))
          subcomp.add('TZOFFSETTO', tz._transition_info[num][0])
          subcomp.add('TZOFFSETFROM', tz._transition_info[num - 1][0])
          timezones[name] = subcomp
  
      for subcomp in timezones.values():
          timezone.add_component(subcomp)
  
      return timezone