code: def build_latex(docsdir, outputdir, version):
      run("make", "clean", cwd=docsdir)
      run("make", "latexpdf", cwd=docsdir)
  
      srcfilename = "sympy-%s.pdf" % (version,)
      dstfilename = "sympy-docs-pdf-%s.pdf" % (version,)
      src = join("doc", "_build", "latex", srcfilename)
      dst = join(outputdir, dstfilename)
      shutil.copyfile(src, dst)
  
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 3 for calling a global function with example usage: build_latex(docsdir, outputdir, version) without return types