code: def test_read_from_rasa2_resource(tmp_path_factory: TempPathFactory):
      # we only search for the fingerprint file - nlu and core folder do not even need
      # to exist
      model_dir = tmp_path_factory.mktemp("model_dir")
      version = "2.8.5"
      rasa.shared.utils.io.dump_obj_as_json_to_file(
          model_dir / "fingerprint.json",
          {"version": version, "irrelevant-other-key": "bla"},
      )
  
      model_zips = tmp_path_factory.mktemp("model_zips")
      resource_name = "model"
      with TarSafe.open(model_zips / resource_name, "w:gz") as tar:
          tar.add(model_dir, arcname="")
  
      storage_dir = tmp_path_factory.mktemp("storage_dir")
      storage = LocalModelStorage(storage_path=storage_dir)
      with pytest.raises(
          UnsupportedModelVersionError, match=f".*{version}.*"
      ):
          storage.from_model_archive(
              storage_path=storage_dir,
              model_archive_path=model_zips / resource_name,
          )
      with pytest.raises(
          UnsupportedModelVersionError, match=f".*{version}.*"
      ):
          storage.metadata_from_archive(
              model_archive_path=model_zips / resource_name
          )
  
imports: import sys
  import uuid
  from datetime import datetime
  from pathlib import Path
  from tarsafe import TarSafe
  import freezegun
  import pytest
  from _pytest.monkeypatch import MonkeyPatch
  from _pytest.tmpdir import TempPathFactory
  import rasa.shared.utils.io
  from rasa.engine.graph import SchemaNode, GraphSchema, GraphModelConfiguration
  from rasa.engine.storage.local_model_storage import LocalModelStorage, MODEL_ARCHIVE_METADATA_FILE
  from rasa.engine.storage.storage import ModelStorage, ModelMetadata
  from rasa.engine.storage.resource import Resource
  from rasa.exceptions import UnsupportedModelVersionError
  from rasa.shared.core.domain import Domain
  from rasa.shared.data import TrainingType
  from tests.engine.graph_components_test_classes import PersistableTestComponent
label_desc: Use image node_id 3 for calling a global function with example usage: test_read_from_rasa2_resource(tmp_path_factory) without return types