code: def figure_to_svg_base64(fig):
      """Save figure as svg and return it as 64 bytes."""
      return base64.b64encode(figure_to_svg_bytes(fig)).decode()
  
imports: import base64
  import io
  import urllib.parse
label_desc: Use image node_id 2 for calling a global function with example usage: figure_to_svg_base64(fig) and returns: base64