code: def _add_debug_info(result, i, sims):
      current_preds = [[result[i].prediction]]
      current_labels = [
          [
              (x["answer_start"], x["answer_start"] + len(x["text"]))
              for x in result[i].ground_truth_answer
          ]
      ]
      # Exclude no answer labels from debug info
      if len(result[i].ground_truth_answer) == 0:
          return None
      # Only add debug info if there is no overlap between predictions and labels
      elif (
          top_n_accuracy(preds=current_preds, labels=current_labels)
          == 0
      ):
          current_info = {}
          current_info["question"] = result[i].question
          current_info["top1_sim"] = np.max(sims[0, :])
          current_info["top1_label"] = result[i].ground_truth_answer[
              np.argmax(sims[0, :])
          ]["text"]
          current_info["top1_pred"] = result[i].prediction[0].answer
  
          idx = np.unravel_index(sims.argmax(), sims.shape)
          current_info["topn_sim"] = np.max(sims)
          current_info["topn_label"] = result[i].ground_truth_answer[
              idx[1]
          ]["text"]
          current_info["topn_pred"] = (
              result[i].prediction[idx[0]].answer
          )
          return current_info
      else:
          return None
  
imports: from sentence_transformers import SentenceTransformer
  from sklearn.metrics.pairwise import cosine_similarity
  import numpy
  from farm.evaluation.metrics import top_n_accuracy
label_desc: Use image node_id 3 for calling a global function with example usage: _add_debug_info(result, i, sims) and returns: None, current_info, None