code: def _verify_features(features, catch24):
      if isinstance(features, str):
          if features == "all":
              f_idx = [i for i in range(22)]
              if catch24:
                  f_idx += [22, 23]
          elif features in feature_names:
              f_idx = [feature_names.index(features)]
          elif catch24 and features == "Mean":
              f_idx = [22]
          elif catch24 and features == "StandardDeviation":
              f_idx = [23]
          else:
              raise ValueError("Invalid feature selection.")
      elif isinstance(features, int):
          if features >= 0 and features < 22:
              f_idx = [features]
          elif catch24 and features == 22:
              f_idx = [22]
          elif catch24 and features == 23:
              f_idx = [23]
          else:
              raise ValueError("Invalid feature selection.")
      elif isinstance(features, (list, tuple)):
          if len(features) > 0:
              f_idx = []
              for f in features:
                  if isinstance(f, str):
                      if f in feature_names:
                          f_idx.append(feature_names.index(f))
                      elif catch24 and f == "Mean":
                          f_idx.append(22)
                      elif catch24 and f == "StandardDeviation":
                          f_idx.append(23)
                      else:
                          raise ValueError("Invalid feature selection.")
                  elif isinstance(f, int):
                      if f >= 0 and f < 22:
                          f_idx.append(f)
                      elif catch24 and f == 22:
                          f_idx.append(22)
                      elif catch24 and f == 23:
                          f_idx.append(23)
                      else:
                          raise ValueError("Invalid feature selection.")
                  else:
                      raise ValueError("Invalid feature selection.")
          else:
              raise ValueError("Invalid feature selection.")
      else:
          raise ValueError("Invalid feature selection.")
  
      return f_idx
  
file_path: sktime/sktime/transformations/panel/catch22.py
imports: import warnings
  import numpy
  import pandas
  from joblib import Parallel, delayed
  from sktime.datatypes import convert_to
  from sktime.transformations.base import BaseTransformer
  from sktime.utils.validation import check_n_jobs
label_desc: Use image node_id 1 for calling a global function with example usage: _verify_features(features, catch24) and returns: f_idx