code: def test_rolling_max(
      min_periods, window_length, gap, window_series_pd
  ):
      gap_num = get_number_from_offset(gap)
      window_length_num = get_number_from_offset(window_length)
      # Since we're using a uniform series we can check correctness using numeric parameters
      expected_vals = apply_rolling_agg_to_series(
          window_series_pd,
          lambda x: x.max(),
          window_length_num,
          gap=gap_num,
          min_periods=min_periods,
      )
  
      primitive_instance = RollingMax(
          window_length=window_length,
          gap=gap,
          min_periods=min_periods,
      )
      primitive_func = primitive_instance.get_function()
  
      actual_vals = pd.Series(
          primitive_func(
              window_series_pd.index, pd.Series(window_series_pd.values)
          ),
      )
  
      # Since min_periods of 0 is the same as min_periods of 1
      num_nans_from_min_periods = min_periods or 1
  
      assert (
          actual_vals.isna().sum()
          == gap_num + num_nans_from_min_periods - 1
      )
      pd.testing.assert_series_equal(
          pd.Series(expected_vals), actual_vals
      )
  
file_path: featuretools/featuretools/tests/primitive_tests/aggregation_primitive_tests/test_rolling_primitive.py
imports: import numpy
  import pandas
  import pytest
  from featuretools.primitives import RollingCount, RollingMax, RollingMean, RollingMin, RollingOutlierCount, RollingSTD, RollingTrend
  from featuretools.primitives.standard.transform.time_series.utils import apply_rolling_agg_to_series
  from featuretools.tests.primitive_tests.utils import get_number_from_offset
label_desc: Use image node_id 1 for calling a global function with example usage: test_rolling_max(min_periods, window_length, gap, window_series_pd) without return types