code: def sub_help(match: re.Match) -> str:
      logger.info("Generating help for `%s`", match.group(1))
      try:
          output = call_dstack(match.group(1))
      except subprocess.CalledProcessError:
          logger.error("Failed to run `%s`", match.group(1))
          return match.group(0)
      return f"```shell\n$ {match.group(1)}\n{output}\n```"
  
file_path: dstack/scripts/docs/gen_cli_reference.py
imports: import logging
  import os
  import re
  import shlex
  import subprocess
  from fnmatch import fnmatch
  from functools import cache
  import mkdocs_gen_files
  from mkdocs.structure.files import File
label_desc: Use image node_id 2 for calling a global function with example usage: sub_help(match) and returns: str, match, str, output, str, match