class_docstr: Splitter that adds the train sets to the test sets.
  
  Takes a splitter ``cv`` and modifies it in the following way:
  The i-th train sets is identical to the i-th train set of ``cv``.
  The i-th test set is the union of the i-th train set and i-th test set of ``cv``.
  
  Parameters
  ----------
  cv : BaseSplitter
      splitter to modify as above
  
  Examples
  --------
  >>> from sktime.datasets import load_airline
  >>> from sktime.split import ExpandingWindowSplitter
  
  >>> y = load_airline()
  >>> y_template = y[:60]
  >>> cv_tpl = ExpandingWindowSplitter(fh=[2, 4], initial_window=24, step_length=12)
  
  >>> splitter = TestPlusTrainSplitter(cv_tpl)
docstr: Get iloc references to train/test splits of `y`.
  
  private _split containing the core logic, called from split
  
  Parameters
  ----------
  y : pd.Index or time series in sktime compatible time series format
      Time series to split, or index of time series to split
  
  Yields
  ------
  train : 1D np.ndarray of dtype int
      Training window indices, iloc references to training indices in y
  test : 1D np.ndarray of dtype int
      Test window indices, iloc references to test indices in y
code: def _split(self, y: pd.Index) -> SPLIT_GENERATOR_TYPE:
      """Get iloc references to train/test splits of `y`.
  
      private _split containing the core logic, called from split
  
      Parameters
      ----------
      y : pd.Index or time series in sktime compatible time series format
          Time series to split, or index of time series to split
  
      Yields
      ------
      train : 1D np.ndarray of dtype int
          Training window indices, iloc references to training indices in y
      test : 1D np.ndarray of dtype int
          Test window indices, iloc references to test indices in y
      """
      cv = self.cv
  
      for y_train_inner, y_test_inner in cv.split(y):
          y_train_self = y_train_inner
          y_test_self = np.union1d(y_train_inner, y_test_inner)
          yield y_train_self, y_test_self
  
file_path: sktime/sktime/split/testplustrain.py
imports: from typing import Optional
  import numpy
  import pandas
  from sktime.split.base import BaseSplitter
  from sktime.split.base._common import ACCEPTED_Y_TYPES, SPLIT_GENERATOR_TYPE
label_desc: Use image node_id 2 for calling the TestPlusTrainSplitter obj's underlying member method code with example usage: obj._split(y) without return types