def run_given_entities(self, query, entities):
    """Run model given the passage title entities."""
    preds = {"top_idx": []}
    for ee in entities:
      try:
        preds["top_idx"].append(self.entity2id[urllib.quote(ee.lower())])
      except KeyError:
        continue
    return self.postprocess(preds, query)
Run model given the passage title entities.
language/labs/drkit/hotpotqa/demo.py