class_docstr: An object that collects relevant information about viewing Python code
  with visual annotations.
class_docstr_tok: ["An","object","that","collects","relevant","information","about","viewing","Python","code","with","visual","annotations","."]
docstr: Render as svg and return svg text. Save file and store name in field svgfilename.
code: def svg(self):
      """
      Render as svg and return svg text. Save file and store name in field svgfilename.
      """
      if (
          self.filename is None
      ):  # have we saved before? (i.e., is it cached?)
          self.savefig(tempfile.mktemp(suffix=".svg"))
      elif not self.filename.endswith(".svg"):
          return None
      with open(self.filename, encoding="UTF-8") as f:
          svg = f.read()
      return svg
  
imports: import sys
  import os
  from pathlib import Path
  import tempfile
  import graphviz
  import graphviz.backend
  import token
  import matplotlib.patches
  import matplotlib.pyplot
  import matplotlib.colors
  from IPython.display import display, SVG
  from IPython import get_ipython
  import numpy
  import tsensor
  import tsensor.ast
  import tsensor.analysis
  import tsensor.parsing
label_desc: Use image node_id 5 for calling the PyVizView obj's underlying member method code with example usage: obj.svg() and returns: svg, None