code: def test_model_sub_class(working_dir, monkeypatch):
      monkeypatch.setenv("MODELKIT_ASSETS_DIR", working_dir)
      with open(os.path.join(working_dir, "something.txt"), "w") as f:
          f.write("OK")
  
      class BaseAsset(Asset):
          def _load(self):
              assert self.asset_path
  
      class DerivedAsset(BaseAsset):
          CONFIGURATIONS = {"derived": {"asset": "something.txt"}}
  
          def _predict(self, item):
              return item
  
      # Abstract models are not loaded even when explicitly requesting them
      lib = ModelLibrary(models=[DerivedAsset, BaseAsset])
      lib.preload()
      assert ["derived"] == list(lib.models.keys())
  
      # Abstract models are ignored when walking through modules
      lib = ModelLibrary(models=testmodels)
      lib.preload()
      assert ["derived_asset", "derived_model"] == sorted(
          list(lib.models.keys())
      )
  
imports: import asyncio
  import os
  import pytest
  from modelkit.assets.errors import AssetDoesNotExistError, InvalidAssetSpecError
  from modelkit.core import errors
  from modelkit.core.library import ConfigurationNotFoundException, ModelLibrary, download_assets, load_model
  from modelkit.core.model import Asset, AsyncModel, Model
  from modelkit.core.model_configuration import ModelConfiguration, _configurations_from_objects, configure, list_assets
  from modelkit.core.settings import LibrarySettings
  from tests import TEST_DIR, testmodels
  from tests.assets.test_versioning import test_versioning
label_desc: Use image node_id 27 for calling a global function with example usage: test_model_sub_class(working_dir, monkeypatch) and returns: item