docs: def adjust_datetime_to_timezone(value, from_tz, to_tz=None):
      """
      Given a ``datetime`` object adjust it according to the from_tz timezone
      string into the to_tz timezone string.
      """
      if to_tz is None:
          to_tz = settings.TIME_ZONE
      if value.tzinfo is None:
          if not hasattr(from_tz, "localize"):
              from_tz = pytz.timezone(smart_str(from_tz))
          value = from_tz.localize(value)
      return value.astimezone(pytz.timezone(smart_str(to_tz)))