def label_to_one_hot(self, labels: List[int]) -> List:
        """ Turn labels to one hot encodings """
        relation = [0] * len(self.rel2id)
        for label in labels:
            relation[label] = 1
        return relation
 Turn labels to one hot encodings 
deeppavlov/dataset_readers/docred_reader.py