code: def build_svelte(html_fname):
      js_fname = html_fname.replace(".html", ".js")
      cmd = (
          "svelte compile --format iife "
          + html_fname
          + " > "
          + js_fname
      )
      print(cmd)
      try:
          print(
              subprocess.check_output(
                  cmd, shell=True, stderr=subprocess.STDOUT
              )
          )
      except subprocess.CalledProcessError as exception:
          print(
              "Svelte build failed! Output:\n{}".format(
                  exception.output.decode()
              )
          )
      return js_fname
  
file_path: lucid/lucid/scratch/web/svelte.py
imports: import random
  import json
  import tempfile
  import subprocess
  import os.path
  import uuid
  from IPython.core.magic import register_cell_magic
  from lucid.misc.io.showing import _display_html
  from lucid.misc.io.reading import read
label_desc: Use image node_id 2 for calling a global function with example usage: build_svelte(html_fname) and returns: js_fname