code: def _pcoa(pair_dists, n_components=2):
      """Principal Coordinate Analysis,
      aka Classical Multidimensional Scaling
      """
      # code referenced from skbio.stats.ordination.pcoa
      # https://github.com/biocore/scikit-bio/blob/0.5.0/skbio/stats/ordination/_principal_coordinate_analysis.py
  
      # pairwise distance matrix is assumed symmetric
      pair_dists = np.asarray(pair_dists, np.float64)
  
      # perform SVD on double centred distance matrix
      n = pair_dists.shape[0]
      H = np.eye(n) - np.ones((n, n)) / n
      B = -H.dot(pair_dists**2).dot(H) / 2
      eigvals, eigvecs = np.linalg.eig(B)
  
      # Take first n_components of eigenvalues and eigenvectors
      # sorted in decreasing order
      ix = eigvals.argsort()[::-1][:n_components]
      eigvals = eigvals[ix]
      eigvecs = eigvecs[:, ix]
  
      # replace any remaining negative eigenvalues and associated eigenvectors with zeroes
      # at least 1 eigenvalue must be zero
      eigvals[np.isclose(eigvals, 0)] = 0
      if np.any(eigvals < 0):
          ix_neg = eigvals < 0
          eigvals[ix_neg] = np.zeros(eigvals[ix_neg].shape)
          eigvecs[:, ix_neg] = np.zeros(eigvecs[:, ix_neg].shape)
  
      return np.sqrt(eigvals) * eigvecs
  
imports: import json
  import logging
  import numpy
  import pandas
  from collections import namedtuple
  from joblib import Parallel, delayed, cpu_count
  from scipy.stats import entropy
  from scipy.spatial.distance import pdist, squareform
  from sklearn.manifold import MDS, TSNE
  from pyLDAvis.utils import NumPyEncoder
label_desc: Use image node_id 5 for calling a global function with example usage: _pcoa(pair_dists, n_components) and returns: unknown