def validate_mask_path(mask_path: Sequence[str] | None) -> list[str] | None:
        """Validate the mask paths for a batch.

        This method validates batches of mask file paths.

        Args:
            mask_path (``Sequence[str]`` | ``None``): Input sequence of mask paths.

        Returns:
            ``list[str]`` | ``None``: Validated list of mask paths, or None.

        Raises:
            TypeError: If ``mask_path`` is not a sequence of strings.

        Example:
            Validate mask paths::

                >>> from anomalib.data.validators import ImageBatchValidator
                >>> mask_paths = ["path/to/mask_1.png", "path/to/mask_2.png"]
                >>> validated = ImageBatchValidator.validate_mask_path(mask_paths)
                >>> validated
                ['path/to/mask_1.png', 'path/to/mask_2.png']
        """
        if mask_path is None:
            return None
        if not isinstance(mask_path, Sequence):
            msg = f"Mask path must be a sequence of paths or strings, got {type(mask_path)}."
            raise TypeError(msg)
        return [str(path) for path in mask_path]
Validate the mask paths for a batch.

        This method validates batches of mask file paths.

        Args:
            mask_path (``Sequence[str]`` | ``None``): Input sequence of mask paths.

        Returns:
            ``list[str]`` | ``None``: Validated list of mask paths, or None.

        Raises:
            TypeError: If ``mask_path`` is not a sequence of strings.

        Example:
            Validate mask paths::

                >>> from anomalib.data.validators import ImageBatchValidator
                >>> mask_paths = ["path/to/mask_1.png", "path/to/mask_2.png"]
                >>> validated = ImageBatchValidator.validate_mask_path(mask_paths)
                >>> validated
                ['path/to/mask_1.png', 'path/to/mask_2.png']
        
src/anomalib/data/validators/torch/image.py