code: def read_reject_parameters(fname):
      """Read rejection parameters from .cov or .ave config file.
  
      Parameters
      ----------
      fname : path-like
          Filename to read.
  
      Returns
      -------
      params : dict
          The rejection parameters.
      """
      with open(fname) as f:
          lines = f.readlines()
  
      reject_names = [
          "gradReject",
          "magReject",
          "eegReject",
          "eogReject",
          "ecgReject",
      ]
      reject_pynames = ["grad", "mag", "eeg", "eog", "ecg"]
      reject = dict()
      for line in lines:
          words = line.split()
          if words[0] in reject_names:
              reject[
                  reject_pynames[reject_names.index(words[0])]
              ] = float(words[1])
  
      return reject
  
label_desc: Use image node_id 2 for calling a global function with example usage: read_reject_parameters(fname) and returns: reject