code: def test_fetch_local_version():
      asset_name = os.path.join("category", "asset")
      local_name = os.path.join(
          TEST_DIR,
          "testdata",
          "test-bucket",
          "assets-prefix",
          asset_name,
      )
      assert _fetch_local_version("", local_name) == {
          "path": local_name
      }
      assert _fetch_local_version("README.md", "") == {
          "path": os.path.join(os.getcwd(), "README.md")
      }
      asset_name = os.path.join(os.getcwd(), "README.md")
      assert _fetch_local_version(asset_name, "") == {
          "path": asset_name
      }
  
      with pytest.raises(errors.AssetDoesNotExistError):
          _fetch_local_version("asset/not/exists", "")
  
file_path: modelkit/tests/assets/test_local_manager.py
imports: import os
  import shutil
  import stat
  import pytest
  from modelkit.assets import errors
  from modelkit.assets.manager import AssetsManager, _fetch_local_version
  from modelkit.assets.remote import StorageProvider
  from modelkit.assets.settings import AssetSpec
  from tests import TEST_DIR
  from tests.assets.test_versioning import test_versioning
label_desc: Use image node_id 9 for calling a global function with example usage: test_fetch_local_version() without return types