          final_entities = []
          final_kb_ids = []
  
          if not docs:
              return final_entities, final_kb_ids
  
          if isinstance(docs, Doc):
              docs = [docs]
  
          context_encodings = self.model.tok2vec(docs)
 
</s> remove         final_entities = []
 </s> add         entity_count = 0 </s> remove     def set_annotations(self, docs, entities, kb_ids=None):
        for entity, kb_id in zip(entities, kb_ids):
            for token in entity:
                token.ent_kb_id_ = kb_id
 </s> add         return final_kb_ids

    def set_annotations(self, docs, kb_ids, tensors=None):
        i=0
        for doc in docs:
            for ent in doc.ents:
                kb_id = kb_ids[i]
                i += 1
                for token in ent:
                    token.ent_kb_id_ = kb_id </s> remove                         final_entities.append(ent)
 </s> add  </s> remove         return final_entities, final_kb_ids
 </s> add         assert len(final_kb_ids) == entity_count
            return final_kb_ids
          final_entities = []
          final_kb_ids = []
  
          if not docs:
            return final_kb_ids
  
          if isinstance(docs, Doc):
              docs = [docs]
  
          context_encodings = self.model.tok2vec(docs)
keep keep keep keep replace keep keep keep keep keep
 have gold.links correspond exactly to doc.ents 
spacy/pipeline/pipes.pyx