code: def _load_compcor(confounds_raw, meta_json, compcor, n_compcor):
      """Load compcor regressors.
  
      Parameters
      ----------
      confounds_raw : pandas.DataFrame
          DataFrame of confounds.
  
      meta_json : dict
          Dictionary of confounds meta data from the confounds.json file.
  
      compcor : str
          Compcor strategy to use. Options are "temporal_anat", "temporal",
          "anat", or "combined".
  
      n_compcor : int or str
          Number of compcor components to retain. If "all", all components
          are retained.
  
      Returns
      -------
      pandas.DataFrame
          DataFrame of compcor regressors.
  
      Raises
      ------
      MissingConfound
          When compcor regressors are not found, raise error as compcor is
          not a valid choice of strategy.
      """
      compcor_cols = find_compcor(meta_json, compcor, n_compcor)
      if check_params(confounds_raw, compcor_cols):
          return confounds_raw[compcor_cols]
      else:
          raise MissingConfound(keywords=["compcor"])
  
file_path: nilearn/nilearn/interfaces/fmriprep/load_confounds_components.py
imports: import numpy
  import pandas
  from .load_confounds_compcor import find_compcor
  from .load_confounds_scrub import optimize_scrub
  from .load_confounds_utils import MissingConfound, add_suffix, check_params, find_confounds
label_desc: Use image node_id 5 for calling a global function with example usage: _load_compcor(confounds_raw, meta_json, compcor, n_compcor) and returns: confounds_raw