code: def _run_command(
      command: str,
      base_dir: PathLike,
      args: list[str],
      debug: bool = False,
  ) -> Popen[bytes]:
      bokehjs_dir = settings.bokehjs_path()
  
      if debug:
          compiler_script = bokehjs_dir / "js" / "compiler" / "main.js"
      else:
          compiler_script = bokehjs_dir / "js" / "compiler.js"
  
      cmd = [
          "--no-deprecation",
          fspath(compiler_script),
          command,
          "--base-dir",
          fspath(base_dir),
          "--bokehjs-dir",
          fspath(bokehjs_dir),
          "--bokeh-version",
          __version__,
      ]
  
      if debug:
          cmd.insert(0, "--inspect-brk")
  
      cmd.extend(args)
  
      proc = Popen([_nodejs_path(), *cmd])
      proc.communicate()
      return proc
  
file_path: bokeh/src/bokeh/ext.py
imports: from __future__ import annotations
  import logging
  from os import fspath
  from subprocess import Popen
  from .None import __version__
  from .core.types import PathLike
  from .settings import settings
  from .util.compiler import _nodejs_path
label_desc: Use image node_id 3 for calling a global function with example usage: _run_command(command, base_dir, args, debug) and returns: proc