code: def _load_motion(confounds_raw, motion):
      """Load the motion regressors.
  
      Parameters
      ----------
      confounds_raw : pandas.DataFrame
          DataFrame of confounds.
  
      motion : str
          Motion strategy to use. Options are "basic",
          "derivatives", "power2", or "full".
  
      Returns
      -------
      pandas.DataFrame
          DataFrame of motion regressors.
  
      Raises
      ------
      MissingConfound
          When motion regressors are not found or incomplete, raise error
          as motion is not a valid choice of strategy.
      """
      motion_params = add_suffix(
          ["trans_x", "trans_y", "trans_z", "rot_x", "rot_y", "rot_z"],
          motion,
      )
      motion_regressor_check = check_params(
          confounds_raw, motion_params
      )
      if isinstance(motion_regressor_check, list):
          raise MissingConfound(params=motion_regressor_check)
  
      if motion_regressor_check:
          return confounds_raw[motion_params]
      else:
          raise MissingConfound(keywords=["motion"])
  
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 1 for calling a global function with example usage: _load_motion(confounds_raw, motion) and returns: confounds_raw