def METHOD_NAME(
    cls: Type[AnyT],
    to_json_fn: Optional[Callable[[AnyT], JsonElement]] = None,
    from_json_fn: Optional[Callable[[Any], AnyT]] = None,
) -> None:
    """
    Register a json marshaller/unmarshaller for the given class.
    :param cls: the class to register
    :param to_json_fn: the function to convert the class to json
    :param from_json_fn: the function to convert json to the class
    """
    log.trace("Register json structure hooks for class %s", cls.__name__)
    if from_json_fn is not None:
        __converter.register_structure_hook(cls, lambda obj, _: from_json_fn(obj))  # type: ignore
    if to_json_fn is not None:
        __converter.register_unstructure_hook(cls, to_json_fn)