def _is_corrupt(filename: str) -> bool:
        """Checks if a single image file is corrupt.

        Args:
            filename: Name of the image file to check.

        Returns:
            True if the image is corrupt, False otherwise.
        """
        try:
            image = Image.open(os.path.join(data_dir, filename))
            image.load()
        except (IOError, UnidentifiedImageError):
            return True
        else:
            return False
Checks if a single image file is corrupt.

        Args:
            filename: Name of the image file to check.

        Returns:
            True if the image is corrupt, False otherwise.
        
lightly/data/_utils.py