code: def test_group_by_dynamic_truncate_to_label_deprecation() -> None:
      df = pl.LazyFrame({"ts": [], "n": []})
      with pytest.warns(
          DeprecationWarning,
          match="replace `truncate=False` with `label='datapoint'`",
      ):
          df.group_by_dynamic("ts", every="1d", truncate=False)
      with pytest.warns(
          DeprecationWarning,
          match="replace `truncate=True` with `label='left'`",
      ):
          df.group_by_dynamic("ts", every="1d", truncate=True)
  
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 5 for calling a global function with example usage: test_group_by_dynamic_truncate_to_label_deprecation() without return types