code: def test_update_registered_model_flow(client):
      name = "UpdateRMTest"
      start_time_1 = get_current_time_millis()
      client.create_registered_model(name)
      end_time_1 = get_current_time_millis()
      registered_model_detailed_1 = client.get_registered_model(name)
      assert registered_model_detailed_1.name == name
      assert str(registered_model_detailed_1.description) == ""
      assert_is_between(
          start_time_1,
          end_time_1,
          registered_model_detailed_1.creation_timestamp,
      )
      assert_is_between(
          start_time_1,
          end_time_1,
          registered_model_detailed_1.last_updated_timestamp,
      )
  
      # update with no args is an error
      with pytest.raises(
          MlflowException,
          match="Attempting to update registered model with no new field values",
      ):
          client.update_registered_model(name=name, description=None)
  
      # update name
      new_name = "UpdateRMTest 2"
      start_time_2 = get_current_time_millis()
      client.rename_registered_model(name=name, new_name=new_name)
      end_time_2 = get_current_time_millis()
      with pytest.raises(
          MlflowException,
          match="Registered Model with name=UpdateRMTest not found",
      ):
          client.get_registered_model(name)
      registered_model_detailed_2 = client.get_registered_model(
          new_name
      )
      assert registered_model_detailed_2.name == new_name
      assert str(registered_model_detailed_2.description) == ""
      assert_is_between(
          start_time_1,
          end_time_1,
          registered_model_detailed_2.creation_timestamp,
      )
      assert_is_between(
          start_time_2,
          end_time_2,
          registered_model_detailed_2.last_updated_timestamp,
      )
  
      # update description
      start_time_3 = get_current_time_millis()
      client.update_registered_model(
          name=new_name, description="This is a test"
      )
      end_time_3 = get_current_time_millis()
      registered_model_detailed_3 = client.get_registered_model(
          new_name
      )
      assert registered_model_detailed_3.name == new_name
      assert registered_model_detailed_3.description == "This is a test"
      assert_is_between(
          start_time_1,
          end_time_1,
          registered_model_detailed_3.creation_timestamp,
      )
      assert_is_between(
          start_time_3,
          end_time_3,
          registered_model_detailed_3.last_updated_timestamp,
      )
  
      # update name and description
      another_new = "UpdateRMTest 4"
      start_time_4 = get_current_time_millis()
      client.update_registered_model(new_name, "4th update")
      client.rename_registered_model(new_name, another_new)
      end_time_4 = get_current_time_millis()
      registered_model_detailed_4 = client.get_registered_model(
          another_new
      )
      assert registered_model_detailed_4.name == another_new
      assert registered_model_detailed_4.description == "4th update"
      assert_is_between(
          start_time_1,
          end_time_1,
          registered_model_detailed_4.creation_timestamp,
      )
      assert_is_between(
          start_time_4,
          end_time_4,
          registered_model_detailed_4.last_updated_timestamp,
      )
  
      # using rename
      previous_name = another_new
      another_new = "UpdateRMTest 5"
      start_time_5 = get_current_time_millis()
      client.rename_registered_model(previous_name, another_new)
      end_time_5 = get_current_time_millis()
      registered_model_detailed_5 = client.get_registered_model(
          another_new
      )
      assert registered_model_detailed_5.name == another_new
      assert registered_model_detailed_5.description == "4th update"
      assert_is_between(
          start_time_1,
          end_time_1,
          registered_model_detailed_5.creation_timestamp,
      )
      assert_is_between(
          start_time_5,
          end_time_5,
          registered_model_detailed_5.last_updated_timestamp,
      )
  
      # old named models are not accessible
      for old_name in [previous_name, name, new_name]:
          with pytest.raises(
              MlflowException,
              match=r"Registered Model with name=UpdateRMTest( \d)? not found",
          ):
              client.get_registered_model(old_name)
  
imports: import time
  import pytest
  from mlflow import MlflowClient
  from mlflow.entities.model_registry import ModelVersion, RegisteredModel
  from mlflow.exceptions import MlflowException
  from mlflow.utils.os import is_windows
  from mlflow.utils.time import get_current_time_millis
  from tests.tracking.integration_test_utils import _init_server
label_desc: Use image node_id 6 for calling a global function with example usage: test_update_registered_model_flow(client) without return types