code: def test_rename_registered_model(store, registered_model_names):
      # Error cases
      model_name = registered_model_names[0]
      with pytest.raises(
          MlflowException,
          match=r"Registered model name cannot be empty\.",
      ):
          store.rename_registered_model(model_name, None)
  
      # test that names of existing registered models are checked before renaming
      other_model_name = registered_model_names[1]
      with pytest.raises(
          MlflowException,
          match=rf"Registered Model \(name={other_model_name}\) already exists\.",
      ):
          store.rename_registered_model(model_name, other_model_name)
  
      new_name = model_name + "!!!"
      store.rename_registered_model(model_name, new_name)
      assert store.get_registered_model(new_name).name == new_name
  
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 9 for calling a global function with example usage: test_rename_registered_model(store, registered_model_names) without return types