def METHOD_NAME(self, path):
    """Yields examples."""
    videos = os.listdir(path)
    videos.sort()
    for vi, video in enumerate(videos):
        # Get all data
        rgb_frames = glob.glob(os.path.join(path, video, "rgb", "*.png"))
        mask_frames = glob.glob(
            os.path.join(path, video, "foreground_mask", "*.png")
        )
        gs_coords_frames = glob.glob(
            os.path.join(path, video, "patch_metadata", "*.npy")
        )
        annotations_txt = os.path.join(path, video, "instances.txt")
        # sort alphabetically
        rgb_frames.sort()
        mask_frames.sort()
        gs_coords_frames.sort()
        # verify data consistency
        assert len(rgb_frames) == len(mask_frames) == len(gs_coords_frames)
        for r, m, g in zip(rgb_frames, mask_frames, gs_coords_frames):
            r = re.split("[./]", r)[-2]  # get filename without extension
            m = re.split("[./]", m)[-2]
            g = re.split("[./]", g)[-2]
            assert r == m == g
        gs_coords = create_gs_coords(gs_coords_frames)
        annotations = np.loadtxt(annotations_txt, dtype=np.float32)
        example = {
            "video": rgb_frames,
            "video_name": video,
            "annotations": annotations,
            "patch_metadata": {
                "gs_coords": gs_coords,
                "masks": mask_frames,
            },
        }
        yield vi, example