def validate_gt_label(gt_label: np.ndarray | Sequence[int] | None) -> np.ndarray | None:
        """Validate the ground truth label batch.

        Args:
            gt_label (``np.ndarray`` | ``Sequence[int]`` | ``None``): Input ground truth
                label batch to validate.

        Returns:
            ``np.ndarray`` | ``None``: Validated ground truth label batch as boolean numpy
                array, or None if input is None.

        Raises:
            TypeError: If the input is not a numpy array or sequence of integers.
            ValueError: If the label batch shape is invalid.

        Example:
            >>> import numpy as np
            >>> validator = NumpyVideoBatchValidator()
            >>> labels = [0, 1, 1, 0]
            >>> validated_labels = validator.validate_gt_label(labels)
            >>> print(validated_labels, validated_labels.dtype)
            [False  True  True False] bool
        """
        if gt_label is None:
            return None
        if isinstance(gt_label, Sequence):
            gt_label = np.array(gt_label)
        if not isinstance(gt_label, np.ndarray):
            msg = f"Ground truth label batch must be a numpy.ndarray, got {type(gt_label)}."
            raise TypeError(msg)
        if gt_label.ndim != 1:
            msg = f"Ground truth label batch must be 1-dimensional, got shape {gt_label.shape}."
            raise ValueError(msg)
        return gt_label.astype(bool)
Validate the ground truth label batch.

        Args:
            gt_label (``np.ndarray`` | ``Sequence[int]`` | ``None``): Input ground truth
                label batch to validate.

        Returns:
            ``np.ndarray`` | ``None``: Validated ground truth label batch as boolean numpy
                array, or None if input is None.

        Raises:
            TypeError: If the input is not a numpy array or sequence of integers.
            ValueError: If the label batch shape is invalid.

        Example:
            >>> import numpy as np
            >>> validator = NumpyVideoBatchValidator()
            >>> labels = [0, 1, 1, 0]
            >>> validated_labels = validator.validate_gt_label(labels)
            >>> print(validated_labels, validated_labels.dtype)
            [False  True  True False] bool
        
src/anomalib/data/validators/numpy/video.py