class_docstr: Temporal train-test splitter, based on cutoff and forecasting horizon.
  
  Train and test splits are determied as follows:
  
  for each cutoff point `k=cutoff[i]`, in `split`:
  
  * training fold is all loc indices up to and including `k`
  * if `fh` is not passed, test fold is all loc indices strictly after `k`
  * if `fh is passed`, test fold is all loc indices in `k + fh`, if `fh` is relative.
    More precisely, `fh.to_absolute_index(cutoff=k)
    If `fh` is absolute, then the test window is `fh` itself.
  
  It should be noted that, unlike in `CutoffSplitter`,
  test folds are not determined by a window length,
  but by indices of the forecasting horizon `fh`, i.e., test folds can be
  non-contiguous, even if the data index is regular.
  
  Parameters
  ----------
  cutoff : np.array or pd.Index
      Cutoff points, positive and integer- or datetime-index like.
      Type should match the type of `fh` input.
  fh : None, ForecastingHorizon, int, timedelta, iterable of ints or timedeltas
      Forecasting horizon, relative or absolute, to determine test folds.
      Type should match the type of `cutoffs` input.
      If not ForecastingHorizon, is coerced.
docstr: Return the number of splits.
  
  Since this splitter returns a single train/test split,
  this number is trivially 1.
  
  Parameters
  ----------
  y : pd.Series or pd.Index, optional (default=None)
      Time series to split
  
  Returns
  -------
  n_splits : int
      The number of splits.
docstr_tok: ["Return","the","number","of","splits",".","Since","this","splitter","returns","a","single","train\/test","split",",","this","number","is","trivially","1",".","Parameters","--","--","--","--","--","y",":","pd.Series","or","pd.Index",",","optional","(","default=None",")","Time","series","to","split","Returns","--","--","--","-","n_splits",":","int","The","number","of","splits","."]
code: def get_n_splits(self, y=None) -> int:
      """Return the number of splits.
  
      Since this splitter returns a single train/test split,
      this number is trivially 1.
  
      Parameters
      ----------
      y : pd.Series or pd.Index, optional (default=None)
          Time series to split
  
      Returns
      -------
      n_splits : int
          The number of splits.
      """
      return len(self.cutoffs)
  
imports: from typing import Optional
  import numpy
  import pandas
  from sktime.split.base import BaseSplitter
  from sktime.split.base._common import ACCEPTED_Y_TYPES, DEFAULT_FH, DEFAULT_WINDOW_LENGTH, FORECASTING_HORIZON_TYPES, SPLIT_GENERATOR_TYPE, _check_fh, _check_inputs_for_compatibility, _get_train_window_via_endpoint
  from sktime.utils.validation import ACCEPTED_WINDOW_LENGTH_TYPES, array_is_datetime64, array_is_int, check_window_length, is_datetime, is_int, is_timedelta
  from sktime.utils.validation.forecasting import VALID_CUTOFF_TYPES, check_cutoffs
label_desc: Use image node_id 3 for calling the CutoffFhSplitter obj's underlying member method code with example usage: obj.get_n_splits(y) and returns: len