code: def test_rolling_error(self):
      with self.assertRaisesRegex(ValueError, "window must be >= 0"):
          ps.range(10).rolling(window=-1)
      with self.assertRaisesRegex(
          ValueError, "min_periods must be >= 0"
      ):
          ps.range(10).rolling(window=1, min_periods=-1)
  
      with self.assertRaisesRegex(
          TypeError,
          "psdf_or_psser must be a series or dataframe; however, got:.*int",
      ):
          Rolling(1, 2)
  
file_path: spark/python/pyspark/pandas/tests/window/test_rolling_error.py
imports: import pyspark.pandas
  from pyspark.testing.pandasutils import PandasOnSparkTestCase, TestUtils
  from pyspark.pandas.window import Rolling
label_desc: Use image node_id 1 for calling the RollingErrorMixin obj's underlying member method code with example usage: obj.test_rolling_error() without return types