code: def _run_cmd(cmd):
      
      if not os.path.exists(cmd[0]):
          cmd[0] = shutil.which(cmd[0])
          assert cmd[0] is not None
  
      shebang_parts = parseshebang.parse(cmd[0])
  
      proc = subprocess.Popen(shebang_parts + cmd,
                              stdout=subprocess.PIPE,
                              stderr=subprocess.PIPE)
      stdout, stderr = proc.communicate()
      return {
          "stdout": stdout,
          "stderr": stderr,
          "code": proc.returncode
      }
docs: Run command specified by :cmd: and return stdout, stderr and code.