'Iterate over all image sentence pairs where an image may be repeated'

def iterImageSentencePair(self):

    for (i, img) in enumerate(self.sent_data):
        for sent in img['sentences']:
            out = {}
            out['image'] = self._getImage(img)
            out['sentence'] = sent
            (yield out)
