code: def test_truncate_monthly(value: dt.date, n: int) -> None:
      result = pl.Series([value]).dt.truncate(f"{n}mo").item()
      # manual calculation
      total = value.year * 12 + value.month - 1
      remainder = total % n
      total -= remainder
      year, month = (total // 12), ((total % 12) + 1)
      expected = dt.datetime(year, month, 1)
      assert result == expected
  
imports: import datetime
  import hypothesis.strategies
  from hypothesis import given
  import polars
label_desc: Use image node_id 1 for calling a global function with example usage: test_truncate_monthly(value, n) without return types