code: def _sanitize_runs(n_time, runs):
      """Check runs are supplied in the correct format \
      and detect the number of unique runs."""
      if runs is not None and len(runs) != n_time:
          raise ValueError(
              f"The length of the run vector ({len(runs)}) "
              f"does not match the length of the signals ({n_time})"
          )
      n_runs = 1 if runs is None else len(np.unique(runs))
      return n_runs, runs
  
imports: import warnings
  import numpy
  import pandas
  from scipy import linalg, signal
  from scipy.interpolate import CubicSpline
  from sklearn.utils import as_float_array, gen_even_slices
  from nilearn._utils import fill_doc, stringify_path
  from nilearn._utils.numpy_conversions import as_ndarray, csv_to_array
  from nilearn._utils.param_validation import check_run_sample_masks
label_desc: Use image node_id 20 for calling a global function with example usage: _sanitize_runs(n_time, runs) and returns: n_runs,  runs