code: def perform_pca(A):
      """
      Computes eigenvalues and eigenvectors of covariance matrix of A.
      The rows of a correspond to observations, the columns to variables.
      """
      # First subtract the mean
      M = (A - numpy.mean(A.T, axis=1)).T
      # Get eigenvectors and values of covariance matrix
      return numpy.linalg.eig(numpy.cov(M))
  
imports: import sys
  import numpy
  import scipy
label_desc: Use image node_id 3 for calling a global function with example usage: perform_pca(A) and returns: numpy