code: def link_thickness_i(X, i):
      diff_embedded = X[i] - X
      dist_embedded = np.einsum(
          "ij,ij->i", diff_embedded, diff_embedded
      )
      dist_embedded[i] = np.inf
  
      # compute exponentiated distances (use the log-sum-exp trick to
      # avoid numerical instabilities
      exp_dist_embedded = np.exp(
          -dist_embedded - logsumexp(-dist_embedded)
      )
      return exp_dist_embedded
  
file_path: scikit-learn/examples/neighbors/plot_nca_illustration.py
imports: import matplotlib.pyplot
  import numpy
  from matplotlib import cm
  from scipy.special import logsumexp
  from sklearn.datasets import make_classification
  from sklearn.neighbors import NeighborhoodComponentsAnalysis
label_desc: Use image node_id 1 for calling a global function with example usage: link_thickness_i(X, i) and returns: exp_dist_embedded