code: def ComputeNMEParameters(A, p, max_num_clusters):
      # p-Neighbour binarization
      Ap = get_kneighbors_conn(A, p)
      # Symmetrization
      Ap = (Ap + np.transpose(Ap)) / 2
      # Laplacian matrix computation
      Lp = Laplacian(Ap)
      # EigenValue Decomposition
      S, eig_vecs = scipy.linalg.eigh(Lp)
      # Eigengap computation
      e = Eigengap(S)
      g = np.max(e[:max_num_clusters]) / (np.max(S) + 1e-10)
      r = p / g
      k = np.argmax(e[:max_num_clusters])
      return (e, g, k, r)
  
file_path: espnet/egs/libri_css/asr1/diarization/spec_clust.py
imports: import argparse
  import numpy
  import scipy
  from kaldiio import ReadHelper
  from sklearn.cluster import SpectralClustering
label_desc: Use image node_id 9 for calling a global function with example usage: ComputeNMEParameters(A, p, max_num_clusters) and returns: e,  g,  k,  r