code: def generate_schema_reference(
      model_path: str, *, overrides: Dict[str, Dict[str, Any]] = None
  ) -> str:
      module, model_name = model_path.rsplit(".", maxsplit=1)
      cls = getattr(importlib.import_module(module), model_name)
      rows = []
      if (
          not overrides
          or "show_root_heading" not in overrides
          or overrides.get("show_root_heading") is True
      ):
          rows.extend(
              [
                  f"### {cls.__name__}",
                  "",
              ]
          )
      rows.extend(
          [
              "| Property | Description | Type | Default value |",
              "| --- | --- | --- | --- |",
          ]
      )
      for name, field in cls.__fields__.items():
          values = dict(
              name=name,
              description=field.field_info.description,
              type=get_type(field.annotation),
              default=str(field.default),
              required=field.required,
          )
          if overrides and name in overrides:
              values.update(overrides[name])
          rows.append(
              "| %s | "
              % " | ".join(
                  [
                      f"`{values['name']}`",
                      (values["description"] or "").replace(
                          "\n", "<br>"
                      ),
                      f"`{values['type']}`",
                      "*required*"
                      if values["required"]
                      else f"`{values['default']}`",
                  ]
              )
          )
      return "\n".join(rows)
  
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 2 for calling a global function with example usage: generate_schema_reference(model_path) and returns: str