def validate_original_image(original_image: torch.Tensor | Video | None) -> torch.Tensor | Video | None:
        """Validate original video or image.

        Args:
            original_image (torch.Tensor | Video | None): Input original video/image or
                ``None``.

        Returns:
            torch.Tensor | Video | None: Validated original video/image or ``None``.

        Raises:
            TypeError: If input is not a ``torch.Tensor`` or ``Video``.
            ValueError: If tensor shape is invalid.

        Examples:
            >>> import torch
            >>> from torchvision.tv_tensors import Video
            >>> from anomalib.data.validators import VideoValidator
            >>> # Video tensor
            >>> video = Video(torch.rand(10, 3, 224, 224))
            >>> validated = VideoValidator.validate_original_image(video)
            >>> validated.shape
            torch.Size([10, 3, 224, 224])

            >>> # Single image
            >>> image = torch.rand(3, 256, 256)
            >>> validated = VideoValidator.validate_original_image(image)
            >>> validated.shape
            torch.Size([3, 256, 256])
        """
        if original_image is None:
            return None

        if not isinstance(original_image, torch.Tensor | Video):
            msg = f"Original image must be a torch.Tensor or torchvision Video object, got {type(original_image)}."
            raise TypeError(msg)

        if original_image.ndim == 3:
            # Single image case
            if original_image.shape[0] != 3:
                msg = f"Original image must have 3 channels, got {original_image.shape[0]}."
                raise ValueError(msg)
        elif original_image.ndim == 4:
            # Video case
            if original_image.shape[1] != 3:
                msg = f"Original video must have 3 channels, got {original_image.shape[1]}."
                raise ValueError(msg)
        else:
            msg = f"Original image/video must have shape [C, H, W] or [T, C, H, W], got shape {original_image.shape}."
            raise ValueError(msg)

        return original_image
Validate original video or image.

        Args:
            original_image (torch.Tensor | Video | None): Input original video/image or
                ``None``.

        Returns:
            torch.Tensor | Video | None: Validated original video/image or ``None``.

        Raises:
            TypeError: If input is not a ``torch.Tensor`` or ``Video``.
            ValueError: If tensor shape is invalid.

        Examples:
            >>> import torch
            >>> from torchvision.tv_tensors import Video
            >>> from anomalib.data.validators import VideoValidator
            >>> # Video tensor
            >>> video = Video(torch.rand(10, 3, 224, 224))
            >>> validated = VideoValidator.validate_original_image(video)
            >>> validated.shape
            torch.Size([10, 3, 224, 224])

            >>> # Single image
            >>> image = torch.rand(3, 256, 256)
            >>> validated = VideoValidator.validate_original_image(image)
            >>> validated.shape
            torch.Size([3, 256, 256])
        
src/anomalib/data/validators/torch/video.py