code: def filter_result(cand, detailed=True):
      wikidata_id = cand.get("wikidata_id", None)
      res = {
          "wikidata_id": wikidata_id,
          "wikipedia_id": cand["id"],
          "wikipedia_title": cand["title"],
      }
  
      if detailed:
          res["aliases"] = cand.get("aliases", None)
          sents = []
  
          for k in range(0, 10):
              key = "sent_desc_{}".format(k + 1)
              sents.append(cand.get(key, ""))
  
          res["sentences"] = sents
  
      return res
  
file_path: BLINK/blink/candidate_retrieval/candidate_generators.py
imports: import pysolr
  import sys
  import utils
label_desc: Use image node_id 3 for calling the Pregenerated_Candidates_Data_Fetcher obj's underlying member method code with example usage: obj.filter_result(cand, detailed) and returns: res