code: def test_offset_by_truncate_sorted_flag() -> None:
      s = pl.Series([datetime(2001, 1, 1), datetime(2001, 1, 2)])
      s = s.set_sorted()
  
      assert s.flags["SORTED_ASC"]
      s1 = s.dt.offset_by("1d")
      assert s1.to_list() == [
          datetime(2001, 1, 2),
          datetime(2001, 1, 3),
      ]
      assert s1.flags["SORTED_ASC"]
      s2 = s1.dt.truncate("1mo")
      assert s2.flags["SORTED_ASC"]
  
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 40 for calling a global function with example usage: test_offset_by_truncate_sorted_flag() without return types