  
      def pipe(self, stream, batch_size=128, n_threads=-1):
          for docs in util.minibatch(stream, size=batch_size):
              docs = list(docs)
              entities, kb_ids = self.predict(docs)
              self.set_annotations(docs, entities, kb_ids)
              yield from docs
  
      def predict(self, docs):
          self.require_model()
          self.require_kb()
 
</s> remove         entities, kb_ids = self.predict([doc])
        self.set_annotations([doc], entities, kb_ids)
 </s> add         kb_ids = self.predict([doc])
        self.set_annotations([doc], kb_ids) </s> remove         final_entities = []
 </s> add         entity_count = 0 </s> remove             return final_entities, final_kb_ids
 </s> add             return final_kb_ids </s> remove         return final_entities, final_kb_ids
 </s> add         assert len(final_kb_ids) == entity_count
            kb_ids = self.predict(docs)
            self.set_annotations(docs, kb_ids)
  
      def pipe(self, stream, batch_size=128, n_threads=-1):
          for docs in util.minibatch(stream, size=batch_size):
              docs = list(docs)
            kb_ids = self.predict(docs)
            self.set_annotations(docs, kb_ids)
            kb_ids = self.predict(docs)
            self.set_annotations(docs, kb_ids)
              yield from docs
  
      def predict(self, docs):
          self.require_model()
          self.require_kb()
keep keep keep keep replace replace keep keep keep keep keep
 have gold.links correspond exactly to doc.ents 
spacy/pipeline/pipes.pyx