code: def test_roll_series_with_gap_nullable_types_with_nans(
      window_series_pd,
  ):
      window_length = 3
      gap = 2
      min_periods = 1
      nullable_floats = window_series_pd.astype("float64").replace(
          {1: np.nan, 3: np.nan},
      )
      nullable_ints = nullable_floats.astype("Int64")
  
      nullable_ints_rolling_max = roll_series_with_gap(
          nullable_ints,
          window_length,
          gap=gap,
          min_periods=min_periods,
      ).max()
      nullable_floats_rolling_max = roll_series_with_gap(
          nullable_floats,
          window_length,
          gap=gap,
          min_periods=min_periods,
      ).max()
  
      pd.testing.assert_series_equal(
          nullable_ints_rolling_max,
          nullable_floats_rolling_max,
      )
  
      expected_early_values = [np.nan, np.nan, 0, 0, 2, 2, 4] + list(
          range(7 - gap, len(window_series_pd) - gap),
      )
      for i in range(len(window_series_pd)):
          actual = nullable_floats_rolling_max.iloc[i]
          expected = expected_early_values[i]
  
          if pd.isnull(actual):
              assert pd.isnull(expected)
          else:
              assert actual == expected
  
imports: from unittest.mock import patch
  import numpy
  import pandas
  import pytest
  from featuretools.primitives import RollingCount, RollingMax, RollingMean, RollingMin, RollingSTD, RollingTrend
  from featuretools.primitives.standard.transform.time_series.utils import _get_rolled_series_without_gap, apply_roll_with_offset_gap, roll_series_with_gap
  from featuretools.tests.primitive_tests.utils import get_number_from_offset
label_desc: Use image node_id 9 for calling a global function with example usage: test_roll_series_with_gap_nullable_types_with_nans(window_series_pd) without return types