code: def test_offset_by_saturating_8217_8474(
      duration: str, input_date: date, expected: date
  ) -> None:
      result = pl.Series([input_date]).dt.offset_by(duration).item()
      assert result == expected
  
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 43 for calling a global function with example usage: test_offset_by_saturating_8217_8474(duration, input_date, expected) without return types