code: def pearson_and_spearman(preds: List[int], labels: List[int]):
      pearson_corr = pearsonr(preds, labels)[0]
      spearman_corr = spearmanr(preds, labels)[0]
      return {
          "pearson": pearson_corr,
          "spearmanr": spearman_corr,
          "pear+spear av": (pearson_corr + spearman_corr) / 2,
      }
  
imports: from typing import Dict, List
  from scipy.stats import pearsonr, spearmanr
  from sklearn.metrics import f1_score, matthews_corrcoef
label_desc: Use image node_id 4 for calling a global function with example usage: pearson_and_spearman(preds, labels) and returns: dict