def experimental(reason: Optional[str] = None):
    """Decorator for experimental API.

    Experimental APIs are newer functionality.
    They are well tested, but due to their novelty there may be minor bugs
    or their intergace may still change in the next releases.

    It can be used to decorate methods.

    .. code-block:: python
        from avalanche._annotations import ExperimentalAPI
        @DeveloperAPI
        def shining_new_method():
            print("Hello, world!")

    :param reason: a message to append to the documentation explaining
        the motivation for the experimental tag.
    :return:
    """
    if reason is None:
        reason = ""

    def decorator(func):
        if func.__doc__ is None:
            func.__doc__ = ""
        else:
            func.__doc__ += "\n\n"

        func.__doc__ += "Warning: Experimental API. " + reason

        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            return func(*args, **kwargs)

        return wrapper

    return decorator
Decorator for experimental API.

    Experimental APIs are newer functionality.
    They are well tested, but due to their novelty there may be minor bugs
    or their intergace may still change in the next releases.

    It can be used to decorate methods.

    .. code-block:: python
        from avalanche._annotations import ExperimentalAPI
        @DeveloperAPI
        def shining_new_method():
            print("Hello, world!")

    :param reason: a message to append to the documentation explaining
        the motivation for the experimental tag.
    :return:
    
avalanche/_annotations.py