def beta(message: str = "This feature is currently in Beta."):
    """The beta decorator is used to indicate that a particular feature is in Beta. A callable or type that has been
    marked as beta will give a ``UserWarning`` when it is called or instantiated. This designation should be used
    following the description given in :ref:`stability`.

    Args:
        message: The message to include in the warning.

    Examples
    ________

    .. testsetup::

        >>> import pytest

    .. doctest::

        >>> from flash.core.utilities.stability import beta
        >>> @beta()
        ... class MyBetaFeature:
        ...     pass
        ...
        >>> with pytest.warns(UserWarning, match="This feature is currently in Beta."):
        ...     MyBetaFeature()  # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
        ...
        <...>
        >>> @beta("This feature is currently in Beta with a custom message.")
        ... class MyBetaFeatureWithCustomMessage:
        ...     pass
        ...
        >>> with pytest.warns(UserWarning, match="This feature is currently in Beta with a custom message."):
        ...     MyBetaFeatureWithCustomMessage()  # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
        ...
        <...>

    """

    def decorator(callable: Union[Callable, Type]):
        if inspect.isclass(callable):
            callable.__init__ = decorator(callable.__init__)
            return callable

        @functools.wraps(callable)
        def wrapper(*args, **kwargs):
            _raise_beta_warning(message)
            return callable(*args, **kwargs)

        return wrapper

    return decorator
The beta decorator is used to indicate that a particular feature is in Beta. A callable or type that has been
    marked as beta will give a ``UserWarning`` when it is called or instantiated. This designation should be used
    following the description given in :ref:`stability`.

    Args:
        message: The message to include in the warning.

    Examples
    ________

    .. testsetup::

        >>> import pytest

    .. doctest::

        >>> from flash.core.utilities.stability import beta
        >>> @beta()
        ... class MyBetaFeature:
        ...     pass
        ...
        >>> with pytest.warns(UserWarning, match="This feature is currently in Beta."):
        ...     MyBetaFeature()  # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
        ...
        <...>
        >>> @beta("This feature is currently in Beta with a custom message.")
        ... class MyBetaFeatureWithCustomMessage:
        ...     pass
        ...
        >>> with pytest.warns(UserWarning, match="This feature is currently in Beta with a custom message."):
        ...     MyBetaFeatureWithCustomMessage()  # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
        ...
        <...>

    
src/flash/core/utilities/stability.py