code: def searchElementById(node, Id, tagname):
      """
      Search element by id in all the children and descendants of node.
  
      id is lower case, not ID which is usually used for getElementById
      """
      nodes = node.getElementsByTagName(tagname)
      for node in nodes:
          an = node.getAttributeNode("id")
          if an and an.nodeValue == Id:
              return node
  
file_path: sympy/doc/generate_logos.py
imports: from argparse import ArgumentParser
  import xml.dom.minidom
  import os.path
  import logging
  import subprocess
  import sys
  from platform import system
label_desc: Use image node_id 7 for calling a global function with example usage: searchElementById(node, Id, tagname) and returns: node