code: def squad_EM_start(preds, labels):
      """
      Count how often the predicted start index exactly matches the start index given by one of the labels
      """
      n_docs = len(preds)
      n_correct = 0
      for pred, label in zip(preds, labels):
          qa_candidate = pred[0][0]
          pred_start = qa_candidate.offset_answer_start
          curr_labels = label
          curr_labels_start = [
              curr_label[0] for curr_label in curr_labels
          ]
          if pred_start in curr_labels_start:
              n_correct += 1
      return n_correct / n_docs if n_docs else 0
  
imports: import logging
  import numpy
  import torch
  from functools import reduce
  from scipy.stats import pearsonr, spearmanr
  from seqeval.metrics import classification_report
  from seqeval.metrics import f1_score
  from sklearn.metrics import matthews_corrcoef, f1_score, mean_squared_error, r2_score, classification_report
  from farm.utils import flatten_list
label_desc: Use image node_id 10 for calling a global function with example usage: squad_EM_start(preds, labels) and returns: unknown