code: def _pseudo_inverse_from_eig(w, V, tol=None):
      """Compute the (Moore-Penrose) pseudo-inverse of the EVD of a symetric
      matrix.
  
      Parameters
      ----------
      w : (..., M) ndarray
        The eigenvalues in ascending order, each repeated according to
        its multiplicity.
  
      v : {(..., M, M) ndarray, (..., M, M) matrix}
        The column ``v[:, i]`` is the normalized eigenvector corresponding
        to the eigenvalue ``w[i]``.  Will return a matrix object if `a` is
        a matrix object.
  
      tol : positive `float`, optional
        Absolute eigenvalues below tol are considered zero.
  
      Returns
      -------
      output : (..., M, N) array_like
        The pseudo-inverse given by the EVD.
      """
      if tol is None:
          tol = np.amax(w) * np.max(w.shape) * np.finfo(w.dtype).eps
      # discard small eigenvalues and invert the rest
      large = np.abs(w) > tol
      w = np.divide(1, w, where=large, out=w)
      w[~large] = 0
  
      return np.dot(V * w, np.conjugate(V).T)
  
imports: import numpy
  from numpy.linalg import LinAlgError
  from sklearn.datasets import make_spd_matrix
  from sklearn.decomposition import PCA
  from sklearn.utils import check_array
  from sklearn.utils.validation import check_X_y, check_random_state
  from .exceptions import PreprocessorError, NonPSDError
  from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
  from scipy.linalg import pinvh, eigh
  import sys
  import time
  import warnings
label_desc: Use image node_id 19 for calling a global function with example usage: _pseudo_inverse_from_eig(w, V, tol) and returns: np