code: def test_indirect_affines():
      T = np.eye(4)
      A = np.random.rand(3, 3)
      if np.linalg.det(A) > 0:
          A = -A
      T[:3, :3] = A
      obj = Affine(T)
      assert not obj.is_direct
      assert_array_almost_equal(T, obj.as_affine())
  
file_path: nipy/nipy/algorithms/registration/tests/test_affine.py
imports: import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  from ....testing import assert_almost_equal
  from ..affine import Affine, Affine2D, Rigid, Rigid2D, Similarity, Similarity2D, rotation_mat2vec, slices2aff, subgrid_affine
label_desc: Use image node_id 6 for calling a global function with example usage: test_indirect_affines() without return types