code: def figure_to_svg_bytes(fig):
      """Save figure as svg and return it as bytes."""
      with io.BytesIO() as io_buffer:
          fig.savefig(
              io_buffer,
              format="svg",
              facecolor="white",
              edgecolor="white",
          )
          return io_buffer.getvalue()
  
imports: import base64
  import io
  import urllib.parse
label_desc: Use image node_id 1 for calling a global function with example usage: figure_to_svg_bytes(fig) and returns: io_buffer