code: def test_apply_roll_with_offset_gap_non_uniform():
      window_length = "3d"
      gap = "3d"
      min_periods = 1
      # When the data isn't uniform, this impacts the number of values in each rolling window
      datetimes = (
          list(pd.date_range(start="2017-01-01", freq="1d", periods=7))
          + list(
              pd.date_range(start="2017-02-01", freq="2d", periods=7)
          )
          + list(
              pd.date_range(start="2017-03-01", freq="1d", periods=7)
          )
      )
      no_freq_series = pd.Series(range(len(datetimes)), index=datetimes)
  
      assert pd.infer_freq(no_freq_series.index) is None
  
      expected_series = pd.Series(
          [None, None, None, 1, 2, 3, 3]
          + [None, None, 1, 1, 1, 1, 1]
          + [None, None, None, 1, 2, 3, 3],
          index=datetimes,
      )
  
      def count_wrapper(sub_s):
          return apply_roll_with_offset_gap(
              sub_s, gap, len, min_periods=min_periods
          )
  
      rolling_count_obj = roll_series_with_gap(
          no_freq_series,
          window_length,
          gap=gap,
          min_periods=min_periods,
      )
      rolling_count_series = rolling_count_obj.apply(count_wrapper)
  
      pd.testing.assert_series_equal(
          rolling_count_series, expected_series
      )
  
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 13 for calling a global function with example usage: test_apply_roll_with_offset_gap_non_uniform() and returns: apply_roll_with_offset_gap