code: def check_cutoffs(cutoffs: VALID_CUTOFF_TYPES) -> np.ndarray:
      """Validate the cutoff.
  
      Parameters
      ----------
      cutoffs : np.ndarray or pd.Index
  
      Returns
      -------
      cutoffs (Sorted array)
  
      Raises
      ------
      ValueError
          If cutoffs is not a instance of np.array or pd.Index
          If cutoffs array is empty.
      """
      if not isinstance(cutoffs, ACCEPTED_CUTOFF_TYPES):
          raise ValueError(
              f"`cutoffs` must be a np.array or pd.Index, but found: {type(cutoffs)}"
          )
      assert array_is_int(cutoffs) or array_is_datetime64(cutoffs)
  
      if len(cutoffs) == 0:
          raise ValueError("Found empty `cutoff` array")
  
      return np.sort(cutoffs)
  
file_path: sktime/sktime/utils/validation/forecasting.py
imports: from datetime import timedelta
  from typing import Optional, Union
  import numpy
  import pandas
  from sklearn.base import clone, is_regressor
  from sklearn.ensemble import GradientBoostingRegressor
  from sktime.utils.validation import array_is_datetime64, array_is_int, is_date_offset, is_int, is_timedelta
  from sktime.utils.validation.series import check_equal_time_index, check_series
label_desc: Use image node_id 9 for calling a global function with example usage: check_cutoffs(cutoffs) and returns: np