code: def _extract(tags, filepath=None, obj=None):
      """Extract info from XML."""
      _soft_import("defusedxml", "reading EGI MFF data")
      from defusedxml.minidom import parse
  
      if obj is not None:
          fileobj = obj
      elif filepath is not None:
          fileobj = parse(filepath)
      else:
          raise ValueError(
              "There is not object or file to extract data"
          )
      infoxml = dict()
      for tag in tags:
          value = fileobj.getElementsByTagName(tag)
          infoxml[tag] = []
          for i in range(len(value)):
              infoxml[tag].append(value[i].firstChild.data)
      return infoxml
  
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 1 for calling a global function with example usage: _extract(tags, filepath, obj) and returns: infoxml