def METHOD_NAME(self):
    """Test that a ValueError is raised if attempting to serialize an unsupported operator."""
    class NotSupported(Operator):  # pylint: disable=too-few-public-methods
        """An operator."""
        ...
    with pytest.raises(
        TypeError, match="Serialization of operator type 'NotSupported' is not supported"
    ):
        DatasetOperator(NotSupported(1))