code: def test_add_duration_3786() -> None:
      df = pl.DataFrame(
          {
              "datetime": [datetime(2022, 1, 1), datetime(2022, 1, 2)],
              "add": [1, 2],
          }
      )
      assert df.slice(0, 1).with_columns(
          (pl.col("datetime") + pl.duration(weeks="add")).alias(
              "add_weeks"
          ),
          (pl.col("datetime") + pl.duration(days="add")).alias(
              "add_days"
          ),
          (pl.col("datetime") + pl.duration(seconds="add")).alias(
              "add_seconds"
          ),
          (pl.col("datetime") + pl.duration(milliseconds="add")).alias(
              "add_milliseconds"
          ),
          (pl.col("datetime") + pl.duration(hours="add")).alias(
              "add_hours"
          ),
      ).to_dict(as_series=False) == {
          "datetime": [datetime(2022, 1, 1, 0, 0)],
          "add": [1],
          "add_weeks": [datetime(2022, 1, 8, 0, 0)],
          "add_days": [datetime(2022, 1, 2, 0, 0)],
          "add_seconds": [datetime(2022, 1, 1, 0, 0, 1)],
          "add_milliseconds": [datetime(2022, 1, 1, 0, 0, 0, 1000)],
          "add_hours": [datetime(2022, 1, 1, 1, 0)],
      }
  
file_path: polars/py-polars/tests/unit/functions/as_datatype/test_duration.py
imports: from __future__ import annotations
  from datetime import date, datetime, timedelta
  from typing import TYPE_CHECKING
  import pytest
  import polars
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 5 for calling a global function with example usage: test_add_duration_3786() without return types