def experimental_class(
    feature_name: str,
) -> Callable[[Type], Type]:  # noqa: UP006
    """Class decorator to mark a class as experimental."""

    def class_decorator(cls: Type):  # noqa: UP006
        original_init = cls.__init__
        cls.is_experimental = True

        def new_init(self: Any, *args: Any, **kwargs: Any):
            warnings.warn(ExperimentalWarning(feature_name))
            original_init(self, *args, **kwargs)

        cls.__init__ = new_init
        return cls

    return class_decorator
Class decorator to mark a class as experimental.
llmfoundry/utils/warnings.py