code: def _basic_confounds(length, random_state=0):
      """Generate random motion parameters \
      (3 translation directions, 3 rotation directions).
  
      Parameters
      ----------
      length : :obj:`int`
          Length of basic confounds.
  
      random_state : :obj:`int` or :obj:`numpy.random.RandomState` instance, \
                     default=0
          Random number generator, or seed.
  
      Returns
      -------
      confounds : :obj:`pandas.DataFrame`.
          Basic confounds.
          This DataFrame will have 9 columns:
          'csf', 'white_matter', 'global_signal'
          'rot_x', 'rot_y', 'rot_z',
          'trans_x', 'trans_y', 'trans_z'.
  
      """
      rand_gen = np.random.default_rng(random_state)
      columns = [
          "csf",
          "white_matter",
          "global_signal",
          "rot_x",
          "rot_y",
          "rot_z",
          "trans_x",
          "trans_y",
          "trans_z",
      ]
      data = rand_gen.random((length, len(columns)))
      confounds = pd.DataFrame(data, columns=columns)
      return confounds
  
imports: from __future__ import annotations
  import itertools
  import json
  import string
  from pathlib import Path
  import numpy
  import pandas
  import scipy.linalg
  import scipy.signal
  from nibabel import Nifti1Image
  from scipy.ndimage import binary_dilation
  from nilearn import datasets, image, maskers, masking
  from nilearn._utils import as_ndarray, logger
  from nilearn.interfaces.bids.utils import bids_entities, check_bids_label, create_bids_filename
  from nilearn.interfaces.fmriprep.tests._testing import get_legal_confound
label_desc: Use image node_id 14 for calling a global function with example usage: _basic_confounds(length, random_state) and returns: confounds