code: def test_roll_series_with_gap_incorrect_types(window_series_pd):
      error = (
          "Window length must be either an offset string or an integer."
      )
      with pytest.raises(TypeError, match=error):
          (
              roll_series_with_gap(
                  window_series_pd,
                  window_length=4.2,
                  gap=4,
                  min_periods=1,
              ),
          )
  
      error = "Gap must be either an offset string or an integer."
      with pytest.raises(TypeError, match=error):
          roll_series_with_gap(
              window_series_pd, window_length=4, gap=4.2, min_periods=1
          )
  
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 17 for calling a global function with example usage: test_roll_series_with_gap_incorrect_types(window_series_pd) without return types