code: def to_timezone(dt, tzinfo=None):
      
      if not dt:
          return dt
      tz = pick_timezone(tzinfo, __timezone__)
      if not tz:
          return dt
      dttz = getattr(dt, 'tzinfo', None)
      if not dttz:
          return dt.replace(tzinfo=tz)
      else:
          return dt.astimezone(tz)
docs: Convert a datetime to timezone