code: def convert_idx_to_name(self, y, lens):
          
          y = [[self.id2label[idx] for idx in row[:l]]
               for row, l in zip(y, lens)]
          return y
docs: Convert label index to name.
  
          Args:
              y (list): label index list.
              lens (list): true length of y.
  
          Returns:
              y: label name list.
  
          Examples:
              >>> # assumes that id2label = {1: 'B-LOC', 2: 'I-LOC'}
              >>> y = [[1, 0, 0], [1, 2, 0], [1, 1, 1]]
              >>> lens = [1, 2, 3]
              >>> self.convert_idx_to_name(y, lens)
              [['B-LOC'], ['B-LOC', 'I-LOC'], ['B-LOC', 'B-LOC', 'B-LOC']]