code: def run(self, cmd: str, **kw: Any) -> str:
      """"""
      envstr = (
          " ".join(f"{k}={v}" for k, v in kw.items())
          + min(len(kw), 1) * " "
      )
      LOG.record(shell(f"{envstr}{cmd}"))
  
      env = dict(os.environ)
      env.update(kw)
  
      if self.dry_run:
          return ""
  
      result = stdlib_run(
          cmd,
          shell=True,
          stdout=PIPE,
          stderr=STDOUT,
          text=True,
          env=env,
      )
  
      if result.returncode != 0:
          raise RuntimeError(*result.stdout.strip().split("\n"))
  
      return result.stdout
  
file_path: bokeh/release/system.py
imports: from __future__ import annotations
  import os
  import sys
  from subprocess import PIPE, STDOUT, run
  from typing import Any
  from .logger import LOG
  from .ui import shell
label_desc: Use image node_id 2 for calling the System obj's underlying member method code with example usage: obj.run(cmd) and returns: result, str