code: def _check_cutoffs_and_y(
      cutoffs: VALID_CUTOFF_TYPES, y: ACCEPTED_Y_TYPES
  ) -> None:
      """Check that combination of inputs is compatible.
  
      Parameters
      ----------
      cutoffs : np.array or pd.Index
          cutoff points, positive and integer- or datetime-index like
      y : pd.Series, pd.DataFrame, np.ndarray, or pd.Index
          coerced and checked version of input y
  
      Raises
      ------
      ValueError
          if max cutoff is above the last observation in `y`
      TypeError
          if `cutoffs` type is not supported
      """
      max_cutoff = np.max(cutoffs)
      msg = (
          "`cutoffs` are incompatible with given `y`. "
          "Maximum cutoff is not smaller than the "
      )
      if array_is_int(cutoffs):
          if max_cutoff >= y.shape[0]:
              raise ValueError(msg + "number of observations.")
      elif array_is_datetime64(cutoffs):
          if max_cutoff >= np.max(y):
              raise ValueError(msg + "maximum index value of `y`.")
      else:
          raise TypeError("Unsupported type of `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 1 for calling a global function with example usage: _check_cutoffs_and_y(cutoffs, y) without return types