code: def test_date_offset() -> None:
      df = pl.DataFrame(
          {
              "dates": pl.datetime_range(
                  datetime(2000, 1, 1),
                  datetime(2020, 1, 1),
                  "1y",
                  eager=True,
              )
          }
      )
  
      # Add two new columns to the DataFrame using the offset_by() method
      df = df.with_columns(
          [
              df["dates"].dt.offset_by("1y").alias("date_plus_1y"),
              df["dates"].dt.offset_by("-1y2mo").alias("date_min"),
          ]
      )
  
      # Assert that the day of the month for all the dates in new columns is 1
      assert (df["date_plus_1y"].dt.day() == 1).all()
      assert (df["date_min"].dt.day() == 1).all()
  
      # Assert that the 'date_min' column contains the expected list of dates
      expected_dates = [
          datetime(year, 11, 1, 0, 0) for year in range(1998, 2019)
      ]
      assert df["date_min"].to_list() == expected_dates
  
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 37 for calling a global function with example usage: test_date_offset() without return types