code: def _get_rolled_series_without_gap(
      window: Series, gap_offset: str
  ) -> Series:
      """Applies the gap offset_string to the rolled window, returning a window
      that is the correct length of time away from the original instance.
  
      Args:
          window (Series): A rolling window that includes both the window length and gap spans of time.
          gap_offset (string): The pandas offset alias that determines how much time at the end of the window
              should be removed.
  
      Returns:
          Series: The window with gap rows removed
      """
      if not len(window):
          return window
  
      window_start_date = window.index[0]
      window_end_date = window.index[-1]
  
      gap_bound = window_end_date - to_offset(gap_offset)
  
      # If the gap is larger than the series, no rows are left in the window
      if gap_bound < window_start_date:
          return Series(dtype="float64")
  
      # Only return the rows that are within the offset's bounds
      return window[window.index <= gap_bound]
  
file_path: featuretools/featuretools/primitives/standard/transform/time_series/utils.py
imports: from typing import Callable, Optional, Union
  import numpy
  import pandas
  from pandas import Series
  from pandas.core.window.rolling import Rolling
  from pandas.tseries.frequencies import to_offset
label_desc: Use image node_id 2 for calling a global function with example usage: _get_rolled_series_without_gap(window, gap_offset) and returns: window, window, Series