  
      def predict(self, docs):
          self.require_model()
          self.require_kb()
  
          entity_count = 0
          final_kb_ids = []
  
 
</s> remove         final_entities = []
 </s> add         entity_count = 0 </s> remove             entities, kb_ids = self.predict(docs)
            self.set_annotations(docs, entities, kb_ids)
 </s> add             kb_ids = self.predict(docs)
            self.set_annotations(docs, kb_ids) </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 </s> remove                     if candidates:
 </s> add                     if not candidates:
                        final_kb_ids.append(self.NIL)  # no prediction possible for this entity
                    else:
        """ Return the KB IDs for each entity in each doc, including NIL if there is no prediction """
  
      def predict(self, docs):
        """ Return the KB IDs for each entity in each doc, including NIL if there is no prediction """
          self.require_model()
          self.require_kb()
  
          entity_count = 0
          final_kb_ids = []
  
keep add keep keep keep keep keep keep
 have gold.links correspond exactly to doc.ents 
spacy/pipeline/pipes.pyx