import os MAXCOUNT = 1000 NAMING = "%06d.tar" def check_sample(sample): assert "__key__" in sample assert "image_path.txt" in sample assert os.path.exists(sample["image_path.txt"]) assert "dataset.txt" in sample assert "data.pyd" in sample