code: def diagonal_covariance(arr, axis=0):
      arr = np.rollaxis(arr, axis)
      arr = arr.reshape(arr.shape[0], -1)
      aTa = np.dot(arr, arr.T)
      return np.allclose(aTa, np.diag(np.diag(aTa)), atol=1e-6)
  
imports: import numpy
  import pytest
  from nipy.io.api import load_image
  from nipy.testing import assert_almost_equal, assert_array_almost_equal, funcfile
  from ..pca import pca
label_desc: Use image node_id 10 for calling a global function with example usage: diagonal_covariance(arr, axis) and returns: np