code: def test_mahalanobis2():
      x = np.random.randn(100, 3)
      Aa = np.zeros([100, 100, 3])
      for i in range(3):
          A = np.random.randn(120, 100)
          A = np.dot(A.T, A)
          Aa[:, :, i] = A
      i = np.random.randint(3)
      mah = np.dot(x[:, i], np.dot(np.linalg.inv(Aa[:, :, i]), x[:, i]))
      f_mah = (multiple_mahalanobis(x, Aa))[i]
      assert_almost_equal(mah, f_mah)
  
file_path: nipy/nipy/algorithms/statistics/tests/test_utils.py
imports: import numpy
  import pytest
  import scipy.linalg
  from numpy.testing import assert_almost_equal, assert_array_almost_equal, assert_array_equal
  from scipy.stats import norm
  from ..utils import check_cast_bin8, multiple_fast_inv, multiple_mahalanobis, z_score
label_desc: Use image node_id 3 for calling a global function with example usage: test_mahalanobis2() without return types