code: def get_acc(trial_file="", emb="", save_kaldi_emb=False):
      trial_score = open("trial_score.txt", "w")
      dirname = os.path.dirname(trial_file)
      with open(emb, "rb") as f:
          emb = pkl.load(f)
      trial_embs = []
      keys = []
      all_scores = []
      all_keys = []
  
      # for each trials in trial file
      with open(trial_file, "r") as f:
          tmp_file = f.readlines()
          for line in tqdm(tmp_file):
              line = line.strip()
              truth, x_speaker, y_speaker = line.split()
  
              x_speaker = x_speaker.split("/")
              x_speaker = "@".join(x_speaker)
  
              y_speaker = y_speaker.split("/")
              y_speaker = "@".join(y_speaker)
  
              X = emb[x_speaker]
              Y = emb[y_speaker]
  
              if save_kaldi_emb and x_speaker not in keys:
                  keys.append(x_speaker)
                  trial_embs.extend([X])
  
              if save_kaldi_emb and y_speaker not in keys:
                  keys.append(y_speaker)
                  trial_embs.extend([Y])
  
              score = np.dot(X, Y) / (
                  (np.dot(X, X) * np.dot(Y, Y)) ** 0.5
              )
              score = (score + 1) / 2
  
              all_scores.append(score)
              trial_score.write(str(score) + "\t" + truth)
              truth = int(truth)
              all_keys.append(truth)
  
              trial_score.write("\n")
      trial_score.close()
  
      if save_kaldi_emb:
          np.save(
              dirname + "/all_embs_voxceleb.npy", np.asarray(trial_embs)
          )
          np.save(dirname + "/all_ids_voxceleb.npy", np.asarray(keys))
          print(
              "Saved KALDI PLDA related embeddings to {}".format(
                  dirname
              )
          )
  
      return np.asarray(all_scores), np.asarray(all_keys)
  
file_path: NeMo/examples/speaker_tasks/recognition/voxceleb_eval.py
imports: import argparse
  import os
  import pickle
  import sys
  import numpy
  from scipy.interpolate import interp1d
  from scipy.optimize import brentq
  from sklearn.metrics import roc_curve
  from tqdm import tqdm
label_desc: Use image node_id 1 for calling a global function with example usage: get_acc(trial_file, emb, save_kaldi_emb) and returns: np,  np