code: def test_environment_asset_load_version(
      monkeypatch, assetsmanager_settings
  ):
      class TestModel(Model):
          def _load(self):
              assert self.asset_path == "path/to/asset"
              self.data = {"some key": "some data"}
  
          def _predict(self, item, **kwargs):
              return self.data
  
      monkeypatch.setenv("MODELKIT_TESTS_TEST_ASSET_VERSION", "undef")
  
      with pytest.raises(InvalidAssetSpecError):
          ModelLibrary(
              required_models=["some_asset"],
              configuration={
                  "some_asset": ModelConfiguration(
                      model_type=TestModel, asset="tests/test_asset"
                  )
              },
              assetsmanager_settings=assetsmanager_settings,
          )
  
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 17 for calling a global function with example usage: test_environment_asset_load_version(monkeypatch, assetsmanager_settings) and returns: self