code: def test_create_registered_model(store):
      name = random_str() + "abCD"
      rm1 = _rm_maker(store, name)
      assert rm1.name == name
      assert rm1.description is None
  
      # error on duplicate
      with pytest.raises(
          MlflowException,
          match=rf"Registered Model \(name={name}\) already exists",
      ) as exception_context:
          _rm_maker(store, name)
      assert exception_context.value.error_code == ErrorCode.Name(
          RESOURCE_ALREADY_EXISTS
      )
  
      # slightly different name is ok
      for name2 in [name + "extra", name + name]:
          rm2 = _rm_maker(store, name2)
          assert rm2.name == name2
  
      # test create model with tags
      name2 = random_str() + "tags"
      tags = [
          RegisteredModelTag("key", "value"),
          RegisteredModelTag("anotherKey", "some other value"),
      ]
      rm2 = _rm_maker(store, name2, tags)
      rmd2 = store.get_registered_model(name2)
      assert rm2.name == name2
      assert rm2.tags == {tag.key: tag.value for tag in tags}
      assert rmd2.name == name2
      assert rmd2.tags == {tag.key: tag.value for tag in tags}
  
      # create with description
      name3 = random_str() + "-description"
      description = "the best model ever"
      rm3 = _rm_maker(store, name3, description=description)
      rmd3 = store.get_registered_model(name3)
      assert rm3.name == name3
      assert rm3.description == description
      assert rmd3.name == name3
      assert rmd3.description == description
  
      # invalid model name will fail
      with pytest.raises(
          MlflowException,
          match=r"Registered model name cannot be empty",
      ) as exception_context:
          _rm_maker(store, None)
      assert exception_context.value.error_code == ErrorCode.Name(
          INVALID_PARAMETER_VALUE
      )
      with pytest.raises(
          MlflowException,
          match=r"Registered model name cannot be empty",
      ) as exception_context:
          _rm_maker(store, "")
      assert exception_context.value.error_code == ErrorCode.Name(
          INVALID_PARAMETER_VALUE
      )
  
imports: import time
  import uuid
  from unittest import mock
  import pytest
  from mlflow.entities.model_registry import ModelVersion, ModelVersionTag, RegisteredModelTag
  from mlflow.environment_variables import MLFLOW_TRACKING_URI
  from mlflow.exceptions import MlflowException
  from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE, RESOURCE_ALREADY_EXISTS, RESOURCE_DOES_NOT_EXIST, ErrorCode
  from mlflow.store.model_registry.dbmodels.models import SqlModelVersion, SqlModelVersionTag, SqlRegisteredModel, SqlRegisteredModelTag
  from mlflow.store.model_registry.sqlalchemy_store import SqlAlchemyStore
  from tests.helper_functions import random_str
label_desc: Use image node_id 5 for calling a global function with example usage: test_create_registered_model(store) without return types