code: def _safe_timezone(obj):
      # type: (Union[str, int, float, _datetime.tzinfo]) -> _Timezone
      
      if isinstance(obj, _Timezone):
          return obj
  
      if obj is None or obj == "local":
          return local_timezone()
  
      if isinstance(obj, (int, float)):
          obj = int(obj * 60 * 60)
      elif isinstance(obj, _datetime.tzinfo):
          # pytz
          if hasattr(obj, "localize"):
              obj = obj.zone
          else:
              offset = obj.utcoffset(None)
  
              if offset is None:
                  offset = _datetime.timedelta(0)
  
              obj = int(offset.total_seconds())
  
      return timezone(obj)
docs: Creates a timezone instance
      from a string, Timezone, TimezoneInfo or integer offset.