code: def run_rule(rule_path: Path) -> Tuple[int, str]:
      rule = rules[rule_path]
      cmds = rule if isinstance(rule, list) else [rule]
      for cmd in cmds:  # run commands sequentially with early breaking.
          assert isinstance(cmd, str)
          try:
              subprocess.run(
                  cmd,
                  cwd=rule_path,
                  shell=True,
                  check=True,
                  stdout=subprocess.PIPE,
                  stderr=subprocess.PIPE,
              )
          except subprocess.CalledProcessError as e:
              return e.returncode, e.stderr.decode("utf-8")
      return (0, "")
  
file_path: determined/pre-commit/check.py
imports: import argparse
  import concurrent.futures
  import multiprocessing
  import os
  import subprocess
  import sys
  from pathlib import Path
  from typing import Dict, Iterable, List, Set, Tuple, Union
label_desc: Use image node_id 3 for calling a global function with example usage: run_rule(rule_path) and returns: int,  str, e,  e