code: def parse(source: Path, dest: Path):
      doc: minidom.Document = minidom.parse(str(source))
  
      svg = doc.getElementsByTagName("svg")
  
      assert len(svg) == 1
      svg = svg[0]
  
      if "content" in svg.attributes:
          svg.removeAttribute("content")
      # svg.attributes['height'] = str(int(svg.attributes['height'].value[:-2]) + 30) + 'px'
      # svg.attributes['width'] = str(int(svg.attributes['width'].value[:-2]) + 30) + 'px'
  
      view_box = svg.attributes["viewBox"].value.split(" ")
      view_box = [float(v) for v in view_box]
      view_box[0] -= 10
      view_box[1] -= 10
      view_box[2] += 20
      view_box[3] += 20
      svg.attributes["viewBox"] = " ".join([str(v) for v in view_box])
  
      svg.attributes[
          "style"
      ] = "background: #1d2127;"  # padding: 10px;'
  
      # clear_switches(doc)
  
      style = doc.createElement("style")
      style.appendChild(doc.createTextNode(STYLES))
      svg.insertBefore(style, svg.childNodes[0])
      add_classes(doc)
  
      with open(str(dest), "w") as f:
          doc.writexml(f)
  
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 7 for calling a global function with example usage: parse(source, dest) without return types