code: def test_offset_by_sortedness(
      time_zone: str | None, offset: str, expected: bool
  ) -> None:
      # create 2 values, as a single value is always sorted
      ser = (
          pl.Series(
              [datetime(2022, 1, 1, 22), datetime(2022, 1, 1, 22)]
          ).dt.replace_time_zone(time_zone)
      ).sort()
      result = ser.dt.offset_by(offset)
      assert result.flags["SORTED_ASC"] == expected
      assert result.flags["SORTED_DESC"] is False
  
imports: from __future__ import annotations
  import sys
  from datetime import date, datetime, time, timedelta
  from typing import TYPE_CHECKING
  import pytest
  import polars
  from polars.datatypes import DTYPE_TEMPORAL_UNITS
  from polars.dependencies import _ZONEINFO_AVAILABLE
  from polars.exceptions import ComputeError, InvalidOperationError
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 10 for calling a global function with example usage: test_offset_by_sortedness(time_zone, offset, expected) without return types