code: def run_apidoc(_):
      out_dir = os.path.abspath(os.path.join(os.path.dirname(__file__)))
      psp_dir = os.path.abspath(
          os.path.join(os.path.dirname(__file__), "..", "perspective")
      )
      cmd_path = "sphinx-apidoc"
      if hasattr(
          sys, "real_prefix"
      ):  # Check to see if we are in a virtualenv
          # If we are, assemble the path manually
          cmd_path = os.path.abspath(
              os.path.join(sys.prefix, "bin", "sphinx-apidoc")
          )
      subprocess.check_call(
          [
              cmd_path,
              "-E",
              "-M",
              "-o",
              out_dir,
              psp_dir,
              "--tocfile perspective-python",
              "--force",
          ]
      )
  
imports: import os
  import sys
  import os.path
  import subprocess
label_desc: Use image node_id 1 for calling a global function with example usage: run_apidoc(_) without return types