code: def test_pinv(rng):
      arr = rng.standard_normal((4, 4, 4, 3, 7))
      _pinv = pinv(arr)
      for i in range(4):
          for j in range(4):
              for k in range(4):
                  assert_array_almost_equal(
                      _pinv[i, j, k], np.linalg.pinv(arr[i, j, k])
                  )
  
file_path: dipy/dipy/utils/tests/test_arrfuncs.py
imports: import sys
  import numpy
  from dipy.utils.arrfuncs import as_native_array, pinv
  from numpy.testing import assert_array_almost_equal, assert_equal, assert_array_equal
  from dipy.testing import assert_true, assert_false
  from dipy.testing.decorators import set_random_number_generator
label_desc: Use image node_id 2 for calling a global function with example usage: test_pinv(rng) without return types