code: def build_html(docsdir, outputdir, version):
      run("make", "clean", cwd=docsdir)
      run("make", "html", cwd=docsdir)
  
      builddir = join(docsdir, "_build")
      docsname = "sympy-docs-html-%s" % (version,)
      zipname = docsname + ".zip"
      cwd = os.getcwd()
      try:
          chdir(builddir)
          shutil.move("html", docsname)
          run("zip", "-9lr", zipname, docsname)
      finally:
          chdir(cwd)
      shutil.move(join(builddir, zipname), join(outputdir, zipname))
  
file_path: sympy/release/build_docs.py
imports: import os
  from os.path import dirname, join, basename, normpath
  from os import chdir
  import shutil
  from helpers import run
label_desc: Use image node_id 2 for calling a global function with example usage: build_html(docsdir, outputdir, version) without return types