code: def test_group_by_dynamic_startby_monday_dst_8737() -> None:
      start_dt = datetime(2021, 11, 6, 20)
      stop_dt = datetime(2021, 11, 7, 20)
      date_range = pl.datetime_range(
          start_dt, stop_dt, "1d", time_zone="US/Central", eager=True
      )
      df = pl.DataFrame(
          {"time": date_range, "value": range(len(date_range))}
      )
      result = df.group_by_dynamic(
          "time", every="1w", start_by="monday"
      ).agg(pl.col("value").mean())
      expected = pl.DataFrame(
          {
              "time": [
                  datetime(2021, 11, 1),
              ],
              "value": [0.5],
          },
      )
      expected = expected.with_columns(
          pl.col("time").dt.replace_time_zone("US/Central")
      )
      assert_frame_equal(result, expected)
  
imports: from __future__ import annotations
  import sys
  from datetime import date, datetime, timedelta
  from typing import TYPE_CHECKING, Any
  import numpy
  import pytest
  import polars
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 23 for calling a global function with example usage: test_group_by_dynamic_startby_monday_dst_8737() without return types