def METHOD_NAME(cls, edict: SerializableExceptionDict) -> "SerializableException":
    assert edict["__type__"] == "SerializableException"
    defined_exception = _get_registry().get_class_by_name(edict.get("__name__", ""))
    if defined_exception is not None:
        return defined_exception(
            message=edict.get("__message__", ""),
            should_report=edict.get("__should_report__", True),
            **edict.get("__extra_data__", {}),
        )
    # if an exception is created from a dictionary which is not in the registry,
    # create a new Exception type with that name and message dynamically.
    # This allows gracefully handling the receiver not having the exception defined
    # on its end while still allowing normal exception behavior.
    return cast(
        SerializableException,
        type(edict["__name__"], (cls,), {})(
            message=edict.get("__message__", ""),
            should_report=edict.get("__should_report__", True),
            **edict.get("__extra_data__", {}),
        ),
    )