'Sorts the entity examples by the annotated entity.'

def sorted_entity_examples(self):

    return sorted([entity for ex in self.entity_examples for entity in ex.get(u'entities')], key=(lambda e: e[u'entity']))
