code: def test_metadata_version_check():
      trained_at = datetime.utcnow()
      old_version = "2.7.2"
      expected_message = (
          f"The model version is trained using Rasa Open Source "
          f"{old_version} and is not compatible with your current "
          f"installation .*"
      )
      with pytest.raises(
          UnsupportedModelVersionError, match=expected_message
      ):
          ModelMetadata(
              trained_at,
              old_version,
              "some id",
              "test_assistant",
              Domain.empty(),
              GraphSchema(nodes={}),
              GraphSchema(nodes={}),
              project_fingerprint="some_fingerprint",
              training_type=TrainingType.NLU,
              core_target="core",
              nlu_target="nlu",
              language="zh",
          )
  
file_path: rasa/tests/engine/storage/test_storage.py
imports: from datetime import datetime
  from pathlib import Path
  import pytest
  from rasa.exceptions import UnsupportedModelVersionError
  from rasa.shared.data import TrainingType
  import rasa.shared.utils.io
  from rasa.engine.graph import GraphSchema, SchemaNode
  from rasa.engine.storage.storage import ModelMetadata
  from rasa.shared.core.domain import Domain
  from tests.engine.graph_components_test_classes import PersistableTestComponent
label_desc: Use image node_id 2 for calling a global function with example usage: test_metadata_version_check() without return types