code: def check_params(confounds_raw, params):
      """Check that specified parameters can be found in the confounds.
  
      Used for motion, wm_csf, global_signal, and compcor regressors.
  
      Parameters
      ----------
      confounds_raw : pandas.DataFrame
          Raw confounds loaded from the confounds file.
  
      params : list of str
          List of parameters constructed based on users choices.
  
      Returns
      -------
      bool or list of str
          True if all parameters are found in the confounds.
          False if none of the parameters are found in the confounds.
          List of parameters that are not found in the confounds
          if only some parameters are found.
      """
      not_found_params = [
          par for par in params if par not in confounds_raw.columns
      ]
      if len(not_found_params) == len(params):
          return False
      elif not_found_params:
          return not_found_params
      else:
          return True
  
imports: import itertools
  import json
  import os
  import re
  import numpy
  import pandas
  from sklearn.preprocessing import scale
  from nilearn._utils.fmriprep_confounds import flag_single_gifti, is_camel_case
  from nilearn.interfaces.bids import parse_bids_filename
  from .load_confounds_scrub import extract_outlier_regressors
label_desc: Use image node_id 1 for calling a global function with example usage: check_params(confounds_raw, params) and returns: False, not_found_params, True