code: def _get_gains(filepath):
      """Parse gains."""
      _soft_import("defusedxml", "reading EGI MFF data")
      from defusedxml.minidom import parse
  
      file_obj = parse(filepath)
      objects = file_obj.getElementsByTagName("calibration")
      gains = dict()
      for ob in objects:
          value = ob.getElementsByTagName("type")
          if value[0].firstChild.data == "GCAL":
              data_g = _extract(["ch"], obj=ob)["ch"]
              gains.update(gcal=np.asarray(data_g, dtype=np.float64))
          elif value[0].firstChild.data == "ICAL":
              data_g = _extract(["ch"], obj=ob)["ch"]
              gains.update(ical=np.asarray(data_g, dtype=np.float64))
      return gains
  
file_path: mne-python/mne/io/egi/general.py
imports: import os
  import re
  import numpy
  from ...utils import _pl, _soft_import
label_desc: Use image node_id 2 for calling a global function with example usage: _get_gains(filepath) and returns: gains