code: def Normalize(xvecs_in):
      N = len(xvecs_in)
      xvec_mean = np.zeros(xvecs_in[0].shape)
      for i in range(N):
          xvec_mean += xvecs_in[i]
      xvec_mean /= N
      xvecs = np.copy(xvecs_in)
      for i in range(N):
          xvecs[i] -= xvec_mean
          xvecs[i] = xvecs[i] / np.linalg.norm(xvecs[i])
      return xvecs
  
file_path: espnet/egs/libri_css/asr1/diarization/calc_cossim_scores.py
imports: import argparse
  import numpy
  from kaldiio import ReadHelper, WriteHelper
  from scipy.spatial.distance import pdist, squareform
label_desc: Use image node_id 3 for calling a global function with example usage: Normalize(xvecs_in) and returns: xvecs