code: def test_rolling_count_primitive_min_periods_nans(
      window_length,
      gap,
      min_periods,
      expected_num_nams,
      window_series_pd,
  ):
      primitive_instance = RollingCount(
          window_length=window_length,
          gap=gap,
          min_periods=min_periods,
      )
      primitive_func = primitive_instance.get_function()
      vals = pd.Series(primitive_func(window_series_pd.index))
  
      assert vals.isna().sum() == expected_num_nams
  
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 6 for calling a global function with example usage: test_rolling_count_primitive_min_periods_nans(window_length, gap, min_periods, expected_num_nams, window_series_pd) without return types