def assert_gluonts(exception_class: type, condition: bool, message: str, *
    args, **kwargs) ->None:
    """
    If the given ``condition`` is ``False``, raises an exception of type
    ``exception_class`` with a message formatted from the ``message`` pattern
    using the ``args`` and ``kwargs`` strings.

    Parameters
    ----------
    exception_class
        The exception class of the raised exception.
    condition
        The condition that must be violated in order to raise the exception.
    message
        A message to pass as the only argument to the exception initializer.
    args
        An optional list of positional arguments to use when formatting the
        exception message.
    kwargs
        An optional list of key-value arguments to use when formatting the
        exception message.
    """
    if not condition:
        raise exception_class(message.format(*args, **kwargs))
