code: def test_serialize_to_json():
      mlflow_exception = MlflowException("test")
      deserialized = json.loads(mlflow_exception.serialize_as_json())
      assert deserialized["message"] == "test"
      assert deserialized["error_code"] == "INTERNAL_ERROR"
  
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 3 for calling a global function with example usage: test_serialize_to_json() without return types