code: def test_create_model_version(store):
      name = "test_for_create_MV"
      store.create_registered_model(name)
      run_id = uuid.uuid4().hex
      with mock.patch("time.time", return_value=456778):
          mv1 = _create_model_version(store, name, "a/b/CD", run_id)
          assert mv1.name == name
          assert mv1.version == 1
  
      mvd1 = store.get_model_version(mv1.name, mv1.version)
      assert mvd1.name == name
      assert mvd1.version == 1
      assert mvd1.current_stage == "None"
      assert mvd1.creation_timestamp == 456778000
      assert mvd1.last_updated_timestamp == 456778000
      assert mvd1.description is None
      assert mvd1.source == "a/b/CD"
      assert mvd1.run_id == run_id
      assert mvd1.status == "READY"
      assert mvd1.status_message is None
      assert mvd1.tags == {}
  
      # new model versions for same name autoincrement versions
      mv2 = _create_model_version(store, name)
      mvd2 = store.get_model_version(name=mv2.name, version=mv2.version)
      assert mv2.version == 2
      assert mvd2.version == 2
  
      # create model version with tags return model version entity with tags
      tags = [
          ModelVersionTag("key", "value"),
          ModelVersionTag("anotherKey", "some other value"),
      ]
      mv3 = _create_model_version(store, name, tags=tags)
      mvd3 = store.get_model_version(name=mv3.name, version=mv3.version)
      assert mv3.version == 3
      assert mv3.tags == {tag.key: tag.value for tag in tags}
      assert mvd3.version == 3
      assert mvd3.tags == {tag.key: tag.value for tag in tags}
  
      # create model versions with runLink
      run_link = "http://localhost:3000/path/to/run/"
      mv4 = _create_model_version(store, name, run_link=run_link)
      mvd4 = store.get_model_version(name, mv4.version)
      assert mv4.version == 4
      assert mv4.run_link == run_link
      assert mvd4.version == 4
      assert mvd4.run_link == run_link
  
      # create model version with description
      description = "the best model ever"
      mv5 = _create_model_version(store, name, description=description)
      mvd5 = store.get_model_version(name, mv5.version)
      assert mv5.version == 5
      assert mv5.description == description
      assert mvd5.version == 5
      assert mvd5.description == description
  
      # create model version without runId
      mv6 = _create_model_version(store, name, run_id=None)
      mvd6 = store.get_model_version(name, mv6.version)
      assert mv6.version == 6
      assert mv6.run_id is None
      assert mvd6.version == 6
      assert mvd6.run_id is None
  
imports: import time
  import uuid
  from typing import List, NamedTuple
  from unittest import mock
  import pytest
  from mlflow.entities.model_registry import ModelVersion, ModelVersionTag, RegisteredModelTag
  from mlflow.exceptions import MlflowException
  from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE, RESOURCE_DOES_NOT_EXIST, ErrorCode
  from mlflow.store.model_registry.file_store import FileStore
  from mlflow.utils.file_utils import path_to_local_file_uri, write_yaml
  from mlflow.utils.time import get_current_time_millis
  from tests.helper_functions import random_int, random_str
label_desc: Use image node_id 20 for calling a global function with example usage: test_create_model_version(store) without return types