code: def _init_fields(subject, session, task, run):
      """Initialize fields to help create a valid BIDS filename.
  
      Parameters
      ----------
      subject : :obj:`str`
          Subject label
  
      session : :obj:`str`
          Session label
  
      task : :obj:`str`
          Task label
  
      run : :obj:`str`
          Run label
  
      Returns
      -------
      dict
          Fields used to create a BIDS filename.
  
      See Also
      --------
      create_bids_filename
  
      """
      fields = {
          "suffix": "bold",
          "extension": "nii.gz",
          "entities": {
              "sub": subject,
              "ses": session,
              "task": task,
              "run": run,
          },
      }
      return fields
  
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 22 for calling a global function with example usage: _init_fields(subject, session, task, run) and returns: fields