def validate_original_image(original_image: np.ndarray | None) -> np.ndarray | None:
        """Validate the original video.

        Args:
            original_image (``np.ndarray`` | ``None``): Input original video to validate.

        Returns:
            ``np.ndarray`` | ``None``: Validated original video, or None if input is None.

        Raises:
            TypeError: If ``original_image`` is not a numpy array.
            ValueError: If ``original_image`` dimensions or channel count are invalid.

        Example:
            >>> import numpy as np
            >>> validator = NumpyVideoValidator()
            >>> video = np.random.rand(10, 224, 224, 3)  # [T, H, W, C]
            >>> validated_video = validator.validate_original_image(video)
            >>> print(validated_video.shape, validated_video.dtype)
            (10, 224, 224, 3) float64
        """
        if original_image is None:
            return None
        if not isinstance(original_image, np.ndarray):
            msg = f"Original image must be a numpy.ndarray, got {type(original_image)}."
            raise TypeError(msg)
        if original_image.ndim not in {3, 4}:
            msg = f"Original image must have shape [T, H, W, C] or [H, W, C], got shape {original_image.shape}."
            raise ValueError(msg)
        if original_image.shape[-1] != 3:
            msg = f"Original image must have 3 channels, got {original_image.shape[-1]}."
            raise ValueError(msg)
        return original_image
Validate the original video.

        Args:
            original_image (``np.ndarray`` | ``None``): Input original video to validate.

        Returns:
            ``np.ndarray`` | ``None``: Validated original video, or None if input is None.

        Raises:
            TypeError: If ``original_image`` is not a numpy array.
            ValueError: If ``original_image`` dimensions or channel count are invalid.

        Example:
            >>> import numpy as np
            >>> validator = NumpyVideoValidator()
            >>> video = np.random.rand(10, 224, 224, 3)  # [T, H, W, C]
            >>> validated_video = validator.validate_original_image(video)
            >>> print(validated_video.shape, validated_video.dtype)
            (10, 224, 224, 3) float64
        
src/anomalib/data/validators/numpy/video.py