class_docstr: Base class for sliding and expanding window splitter.
code: def _split(self, y: pd.Index) -> SPLIT_GENERATOR_TYPE:
      n_timepoints = y.shape[0]
      window_length = check_window_length(
          window_length=self.window_length,
          n_timepoints=n_timepoints,
          name="window_length",
      )
      initial_window = check_window_length(
          window_length=self._initial_window,
          n_timepoints=n_timepoints,
          name="initial_window",
      )
      fh = _check_fh(self.fh)
      _check_window_lengths(
          y=y,
          fh=fh,
          window_length=window_length,
          initial_window=initial_window,
      )
  
      if self._initial_window is not None:
          yield self._split_for_initial_window(y)
  
      yield from self._split_windows(
          window_length=window_length, y=y, fh=fh
      )
  
imports: from typing import Optional
  import numpy
  import pandas
  from sktime.datatypes._utilities import get_index_for_series
  from sktime.forecasting.base import ForecastingHorizon
  from sktime.split.base import BaseSplitter
  from sktime.split.base._common import ACCEPTED_Y_TYPES, FORECASTING_HORIZON_TYPES, SPLIT_ARRAY_TYPE, SPLIT_GENERATOR_TYPE, _check_fh, _check_inputs_for_compatibility, _get_end
  from sktime.utils.validation import ACCEPTED_WINDOW_LENGTH_TYPES, NON_FLOAT_WINDOW_LENGTH_TYPES, array_is_int, check_window_length, is_int, is_timedelta_or_date_offset
  from sktime.utils.validation.forecasting import check_step_length
label_desc: Use image node_id 3 for calling the BaseWindowSplitter obj's underlying member method code with example usage: obj._split(y) without return types