code: def read_flat_parameters(fname):
      """Read flat channel rejection parameters from .cov or .ave config file."""
      with open(fname) as f:
          lines = f.readlines()
  
      reject_names = [
          "gradFlat",
          "magFlat",
          "eegFlat",
          "eogFlat",
          "ecgFlat",
      ]
      reject_pynames = ["grad", "mag", "eeg", "eog", "ecg"]
      flat = dict()
      for line in lines:
          words = line.split()
          if words[0] in reject_names:
              flat[
                  reject_pynames[reject_names.index(words[0])]
              ] = float(words[1])
  
      return flat
  
label_desc: Use image node_id 3 for calling a global function with example usage: read_flat_parameters(fname) and returns: flat