code: def test_describe(monkeypatch):
      monkeypatch.setenv(
          "MODELKIT_ASSETS_DIR",
          os.path.join(TEST_DIR, "testdata", "test-bucket"),
      )
  
      class SomeSimpleValidatedModelWithAsset(Model[str, str]):
          """
          This is a summary
  
          that also has plenty more text
          """
  
          CONFIGURATIONS = {"some_model_a": {"asset": "assets-prefix"}}
  
          def _predict(self, item):
              return item
  
      class SomeSimpleValidatedModelA(Model[str, str]):
          """
          This is a summary
  
          that also has plenty more text
          """
  
          CONFIGURATIONS = {"some_model_a": {}}
  
          def _predict(self, item):
              return item
  
      class ItemModel(pydantic.BaseModel):
          string: str
  
      class ResultModel(pydantic.BaseModel):
          sorted: str
  
      class A:
          def __init__(self):
              self.x = 1
              self.y = 2
  
      class SomeComplexValidatedModelA(Model[ItemModel, ResultModel]):
          """
          More complex
  
          With **a lot** of documentation
          """
  
          CONFIGURATIONS = {
              "some_complex_model_a": {
                  "model_dependencies": ["some_model_a"],
                  "asset": os.path.join(
                      TEST_DIR,
                      "testdata",
                      "test-bucket",
                      "assets-prefix",
                      "category",
                      "asset",
                      "0.0",
                  ),
                  "model_settings": {"batch_size": 128},
              }
          }
  
          def __init__(self, *args, **kwargs):
              super().__init__(*args, **kwargs)
              self.some_object = A()
  
          def _predict(self, item):
              return item
  
      # test without a console and no models
      library = ModelLibrary()
      library.describe()
  
      # test with assets
      library = ModelLibrary(
          models=[
              SomeSimpleValidatedModelA,
              SomeSimpleValidatedModelWithAsset,
              SomeComplexValidatedModelA,
          ]
      )
      library.describe()
  
      # test with models but not assets
      library = ModelLibrary(
          models=[SomeSimpleValidatedModelA, SomeComplexValidatedModelA]
      )
      console = Console(no_color=True, force_terminal=False, width=130)
  
      with console.capture() as capture:
          library.describe(console=console)
  
      if platform.system() == "Windows" or sys.version_info[:2] < (
          3,
          11,
      ):
          # Output is different on Windows platforms since
          # modelkit.utils.memory cannot track memory increment
          # and write it
          # It also has a few minor typing differences depending on
          # the python version
          return
      r = ReferenceText(os.path.join(TEST_DIR, "testdata"))
      captured = capture.get()
      EXCLUDED = [
          "load time",
          "load memory",
          "asset",
          "category/asset",
          os.path.sep,
      ]
      captured = "\n".join(
          line
          for line in captured.split("\n")
          if not any(x in line for x in EXCLUDED)
      )
      r.assert_equal("library_describe.txt", captured)
  
file_path: modelkit/tests/test_describe.py
imports: import os
  import platform
  import sys
  from typing import Any
  import pydantic
  import pytest
  from rich.console import Console
  from modelkit.core.library import ModelLibrary
  from modelkit.core.model import Model, add_dependencies_load_info
  from modelkit.testing import ReferenceText
  from modelkit.utils.pretty import describe
  from tests import TEST_DIR
label_desc: Use image node_id 1 for calling a global function with example usage: test_describe(monkeypatch) and returns: item, item, item