code: def _check_strategy(strategy):
      """Ensure the denoising strategies combinations are valid.
  
      Parameters
      ----------
      strategy : :obj:`tuple` or :obj:`list` of :obj:`str`.
          See :func:`nilearn.interfaces.fmriprep.load_confounds` for details.
  
      Raises
      ------
      ValueError
          If any of the confounds specified in the strategy are not supported,
          or the combination of the strategies are not valid.
      """
      if (not isinstance(strategy, tuple)) and (
          not isinstance(strategy, list)
      ):
          raise ValueError(
              "strategy needs to be a tuple or list of strings"
              f" A {type(strategy)} was provided instead."
          )
      for conf in strategy:
          if conf == "non_steady_state":
              warnings.warn(
                  "Non-steady state volumes are always detected. It "
                  "doesn't need to be supplied as part of the "
                  "strategy. Supplying non_steady_state in strategy "
                  "will not have additional effect."
              )
          if conf not in all_confounds:
              raise ValueError(
                  f"{conf} is not a supported type of confounds."
              )
  
      # high pass filtering must be present if using fmriprep compcor outputs
      if ("compcor" in strategy) and ("high_pass" not in strategy):
          raise ValueError(
              "When using compcor, `high_pass` must be included in "
              f"strategy. Current strategy: '{strategy}'"
          )
  
file_path: nilearn/nilearn/interfaces/fmriprep/load_confounds.py
imports: import warnings
  import pandas
  from .None import load_confounds_components
  from .load_confounds_utils import MissingConfound, get_confounds_file, get_json, load_confounds_file_as_dataframe, load_confounds_json, prepare_output, sanitize_confounds
label_desc: Use image node_id 1 for calling a global function with example usage: _check_strategy(strategy) without return types