code: def add_classes(doc: minidom.Document):
      paths = doc.getElementsByTagName("path")
      add_stroke_classes(paths)
      add_fill_classes(paths)
  
      rects = doc.getElementsByTagName("rect")
      add_stroke_classes(rects)
      add_fill_classes(rects)
  
      ellipse = doc.getElementsByTagName("ellipse")
      add_stroke_classes(ellipse)
      add_fill_classes(ellipse)
  
      text = doc.getElementsByTagName("text")
      add_fill_classes(text)
  
      div = doc.getElementsByTagName("div")
      add_bg_classes(div)
  
      span = doc.getElementsByTagName("span")
      add_bg_classes(span)
  
file_path: annotated_deep_learning_paper_implementations/utils/diagrams.py
imports: import shutil
  from pathlib import Path
  from typing import List
  from xml.dom import minidom
  from labml import monit
label_desc: Use image node_id 6 for calling a global function with example usage: add_classes(doc) without return types