code: def test_rolling_negative_period() -> None:
      df = pl.DataFrame(
          {"ts": [datetime(2020, 1, 1)], "value": [1]}
      ).with_columns(pl.col("ts").set_sorted())
      with pytest.raises(
          ComputeError,
          match="rolling window period should be strictly positive",
      ):
          df.rolling("ts", period="-1d", offset="-1d").agg(
              pl.col("value")
          )
      with pytest.raises(
          ComputeError,
          match="rolling window period should be strictly positive",
      ):
          df.lazy().rolling("ts", period="-1d", offset="-1d").agg(
              pl.col("value")
          ).collect()
      with pytest.raises(
          ComputeError, match="window size should be strictly positive"
      ):
          df.select(
              pl.col("value").rolling_min(
                  by="ts", window_size="-1d", closed="left"
              )
          )
      with pytest.raises(
          ComputeError, match="window size should be strictly positive"
      ):
          df.lazy().select(
              pl.col("value").rolling_min(
                  by="ts", window_size="-1d", closed="left"
              )
          ).collect()
  
imports: from __future__ import annotations
  from datetime import date, datetime, timedelta
  from typing import TYPE_CHECKING
  import numpy
  import pytest
  from numpy import nan
  import polars
  from polars.exceptions import ComputeError
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 14 for calling a global function with example usage: test_rolling_negative_period() without return types