code: def save_svg(
      chart,
      file,
  ):
      """
      Save an Altair Chart to a static SVG image file after pre-applying data transformations
      and removing unused columns
  
      :param chart: alt.Chart
          The Altair chart to save
      :param file: str, pathlib.Path, or file-like object
          The file path to write the SVG file to, or a file-like object to write to
      """
      from . import enable
  
      with enable():
          vegalite_spec = chart.to_dict()
  
      bundle = spec_to_mime_bundle(
          spec=vegalite_spec,
          mimetype="svg",
      )
  
      svg = bundle["image/svg+xml"]
      write_file_or_filename(file, svg, "w")
  
file_path: vegafusion/python/vegafusion/vegafusion/save.py
imports: import json
  import pathlib
  from .renderer import spec_to_mime_bundle
label_desc: Use image node_id 4 for calling a global function with example usage: save_svg(chart, file) without return types