code: def test_rest_exception():
      mlflow_exception = MlflowException(
          "test", error_code=RESOURCE_ALREADY_EXISTS
      )
      json_exception = mlflow_exception.serialize_as_json()
      deserialized_rest_exception = RestException(
          json.loads(json_exception)
      )
      assert (
          deserialized_rest_exception.error_code
          == "RESOURCE_ALREADY_EXISTS"
      )
      assert "test" in deserialized_rest_exception.message
  
file_path: mlflow/tests/test_exceptions.py
imports: import json
  from mlflow.exceptions import MlflowException, RestException
  from mlflow.protos.databricks_pb2 import ENDPOINT_NOT_FOUND, INTERNAL_ERROR, INVALID_PARAMETER_VALUE, INVALID_STATE, IO_ERROR, RESOURCE_ALREADY_EXISTS
label_desc: Use image node_id 6 for calling a global function with example usage: test_rest_exception() without return types