code: def precision_at_10(en_sentvecs, in_sentvecs):
      en_sentvecs = np.array(en_sentvecs)
      in_sentvecs = np.array(in_sentvecs)
      n = en_sentvecs.shape[0]
  
      # mean centering
      en_sentvecs = en_sentvecs - np.mean(en_sentvecs, axis=0)
      in_sentvecs = in_sentvecs - np.mean(in_sentvecs, axis=0)
  
      sim = cdist(en_sentvecs, in_sentvecs, "cosine")
      actual = np.array(range(n))
      preds = sim.argsort(axis=1)[:, :10]
      matches = np.any(preds == actual[:, None], axis=1)
      return float(matches.mean())
  
file_path: datasets/metrics/indic_glue/indic_glue.py
imports: import numpy
  from scipy.spatial.distance import cdist
  from sklearn.metrics import f1_score
  import datasets
label_desc: Use image node_id 3 for calling a global function with example usage: precision_at_10(en_sentvecs, in_sentvecs) and returns: float