code: def test_repeat_by_logical_dtype() -> None:
      with pl.StringCache():
          df = pl.DataFrame(
              {
                  "repeat": [1, 2, 3],
                  "date": [date(2021, 1, 1)] * 3,
                  "cat": ["a", "b", "c"],
              },
              schema={
                  "repeat": pl.Int32,
                  "date": pl.Date,
                  "cat": pl.Categorical,
              },
          )
          out = df.select(
              pl.col("date").repeat_by("repeat"),
              pl.col("cat").repeat_by("repeat"),
          )
  
          expected_df = pl.DataFrame(
              {
                  "date": [
                      [date(2021, 1, 1)],
                      [date(2021, 1, 1), date(2021, 1, 1)],
                      [
                          date(2021, 1, 1),
                          date(2021, 1, 1),
                          date(2021, 1, 1),
                      ],
                  ],
                  "cat": [["a"], ["b", "b"], ["c", "c", "c"]],
              },
              schema={
                  "date": pl.List(pl.Date),
                  "cat": pl.List(pl.Categorical),
              },
          )
  
          assert_frame_equal(out, expected_df)
  
file_path: polars/py-polars/tests/unit/functions/test_repeat.py
imports: from __future__ import annotations
  from datetime import date, datetime, time, timedelta
  from typing import Any
  import pytest
  import polars
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 11 for calling a global function with example usage: test_repeat_by_logical_dtype() without return types