code: def test_rolling_series_basic(data, index, agg, nulls, center):
      rng = np.random.default_rng(1)
  
      if len(data) > 0:
          if nulls == "one":
              p = rng.integers(0, len(data))
              data[p] = np.nan
          elif nulls == "some":
              p1, p2 = rng.integers(0, len(data), (2,))
              data[p1] = np.nan
              data[p2] = np.nan
          elif nulls == "all":
              data = [np.nan] * len(data)
  
      psr = _create_pandas_series_float64_default(data, index=index)
      gsr = cudf.Series(psr)
      for window_size in range(1, len(data) + 1):
          for min_periods in range(1, window_size + 1):
              expect = getattr(
                  psr.rolling(window_size, min_periods, center), agg
              )().fillna(-1)
              got = getattr(
                  gsr.rolling(window_size, min_periods, center), agg
              )().fillna(-1)
              assert_eq(
                  expect, got, check_dtype=False, check_freq=False
              )
  
imports: import math
  from contextlib import contextmanager
  import numpy
  import pandas
  import pytest
  import cudf
  from cudf.core._compat import PANDAS_GE_150
  from cudf.testing._utils import _create_pandas_series_float64_default, assert_eq
  from cudf.testing.dataset_generator import rand_dataframe
label_desc: Use image node_id 2 for calling a global function with example usage: test_rolling_series_basic(data, index, agg, nulls, center) without return types