def __init_subclass__(cls, **kwargs) -> None:
        """Ensure that the subclass has the required attributes.

        Args:
            **kwargs: Additional keyword arguments

        Raises:
            AttributeError: If item_class is not defined
        """
        super().__init_subclass__(**kwargs)
        if not (hasattr(cls, "item_class") or issubclass(cls, ABC)):
            msg = f"{cls.__name__} must have an 'item_class' attribute."
            raise AttributeError(msg)
Ensure that the subclass has the required attributes.

        Args:
            **kwargs: Additional keyword arguments

        Raises:
            AttributeError: If item_class is not defined
        
src/anomalib/data/dataclasses/generic.py