code: def test_rolling_outlier_count(
      min_periods,
      window_length,
      gap,
      rolling_outlier_series_pd,
  ):
      primitive_instance = RollingOutlierCount(
          window_length=window_length,
          gap=gap,
          min_periods=min_periods,
      )
  
      primitive_func = primitive_instance.get_function()
  
      actual_vals = pd.Series(
          primitive_func(
              rolling_outlier_series_pd.index,
              pd.Series(rolling_outlier_series_pd.values),
          ),
      )
  
      expected_vals = apply_rolling_agg_to_series(
          series=rolling_outlier_series_pd,
          agg_func=primitive_instance.get_outliers_count,
          window_length=window_length,
          gap=gap,
          min_periods=min_periods,
      )
  
      # 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()
          == get_number_from_offset(gap) + num_nans_from_min_periods - 1
      )
      pd.testing.assert_series_equal(
          actual_vals, pd.Series(data=expected_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 13 for calling a global function with example usage: test_rolling_outlier_count(min_periods, window_length, gap, rolling_outlier_series_pd) without return types