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]
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
    
featuretools/primitives/standard/transform/time_series/utils.py