code: def test_sorted_flag_group_by_dynamic() -> None:
      df = pl.DataFrame(
          {"ts": [date(2020, 1, 1), date(2020, 1, 2)], "val": [1, 2]}
      )
      assert (
          (
              df.group_by_dynamic(
                  pl.col("ts").set_sorted(), every="1d"
              ).agg(pl.col("val").sum())
          )
          .to_series()
          .flags["SORTED_ASC"]
      )
  
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 10 for calling a global function with example usage: test_sorted_flag_group_by_dynamic() without return types