def _get_dataset(self, index: int):
    offset = 0
    for offset in range(5):
        (image, bboxes) = self._convert_dataset_to_image_and_bboxes(self.dataset[((index + offset) % len(self.dataset))])
        if (image is None):
            offset += 1
        else:
            return (image, bboxes)
    raise FileNotFoundError('Failed to find images')
def _get_dataset(self, index: int):
    offset = 0
    for offset in range(5):
        (image, bboxes) = self._convert_dataset_to_image_and_bboxes(self.dataset[((index + offset) % len(self.dataset))])
        if (image is None):
            offset += 1
        else:
            return (image, bboxes)
    raise FileNotFoundError('Failed to find images')