code: def sub_schema_reference(match: re.Match) -> str:
      logger.info(
          "Generating schema reference for `%s`", match.group(1)
      )
      try:
          options = yaml.safe_load(
              "\n".join(row[4:] for row in match.group(2).split("\n"))
          )
          logger.debug("Options: %s", options)
          return (
              generate_schema_reference(
                  match.group(1), **(options or {})
              )
              + "\n\n"
          )
      except Exception as e:
          logger.error(
              "Failed to generate schema reference for `%s`: %s",
              match.group(1),
              e,
          )
          return match.group(0)
  
file_path: dstack/scripts/docs/gen_schema_reference.py
imports: import importlib
  import logging
  import re
  from fnmatch import fnmatch
  from typing import Annotated, Any, Dict, Literal, Type, Union, get_args, get_origin
  import mkdocs_gen_files
  import yaml
  from mkdocs.structure.files import File
label_desc: Use image node_id 3 for calling a global function with example usage: sub_schema_reference(match) and returns: unknown, match