'sample image sentence pair from a split'

def sampleImageSentencePair(self, split='train'):

    images = self.split[split]
    img = random.choice(images)
    sent = random.choice(img['sentences'])
    out = {}
    out['image'] = self._getImage(img)
    out['sentence'] = self._getSentence(sent)
    return out
