code: def install_cmdstan_deps(cmdstan_dir: Path):
      import cmdstanpy
      from multiprocessing import cpu_count
  
      if repackage_cmdstan():
          if IS_WINDOWS:
              maybe_install_cmdstan_toolchain()
          print("Installing cmdstan to", cmdstan_dir)
          if os.path.isdir(cmdstan_dir):
              rmtree(cmdstan_dir)
  
          if not cmdstanpy.install_cmdstan(
              version=CMDSTAN_VERSION,
              dir=cmdstan_dir.parent,
              overwrite=True,
              verbose=True,
              cores=cpu_count(),
              progress=True,
          ):
              raise RuntimeError(
                  "CmdStan failed to install in repackaged directory"
              )
  
imports: import os
  import platform
  from pathlib import Path
  from shutil import copy, copytree, rmtree
  from typing import List
  import tempfile
  from setuptools import find_packages, setup, Extension
  from setuptools.command.build_ext import build_ext
  from setuptools.command.build_py import build_py
  from setuptools.command.editable_wheel import editable_wheel
  from wheel.bdist_wheel import bdist_wheel
label_desc: Use image node_id 4 for calling a global function with example usage: install_cmdstan_deps(cmdstan_dir) without return types