code: def test_update_registered_model_permission(store):
      username1 = random_str()
      password1 = random_str()
      _user_maker(store, username1, password1)
  
      name1 = random_str()
      permission1 = READ.name
      _rmp_maker(store, name1, username1, permission1)
  
      permission2 = EDIT.name
      store.update_registered_model_permission(
          name1, username1, permission2
      )
      rmp1 = store.get_registered_model_permission(name1, username1)
      assert rmp1.permission == permission2
  
      # invalid permission will fail
      with pytest.raises(
          MlflowException, match=r"Invalid permission"
      ) as exception_context:
          store.update_registered_model_permission(
              name1, username1, "some_invalid_permission_string"
          )
      assert exception_context.value.error_code == ErrorCode.Name(
          INVALID_PARAMETER_VALUE
      )
  
imports: import pytest
  from mlflow.exceptions import MlflowException
  from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE, RESOURCE_ALREADY_EXISTS, RESOURCE_DOES_NOT_EXIST, ErrorCode
  from mlflow.server.auth.entities import ExperimentPermission, RegisteredModelPermission, User
  from mlflow.server.auth.permissions import ALL_PERMISSIONS, EDIT, READ
  from mlflow.server.auth.sqlalchemy_store import SqlAlchemyStore
  from tests.helper_functions import random_str
label_desc: Use image node_id 20 for calling a global function with example usage: test_update_registered_model_permission(store) without return types