code: def test_affine_inverse():
      incs, outcs, aff = affine_v2w()
      _ = np.linalg.inv(aff)
      cm = AffineTransform(incs, outcs, aff)
      x = np.array([10, 20, 30], np.float64)
      x_roundtrip = cm(cm.inverse()(x))
      assert_almost_equal(x_roundtrip, x)
      badaff = np.array([[1, 2, 3], [0, 0, 1]])
      badcm = AffineTransform(
          CoordinateSystem("ij"), CoordinateSystem("x"), badaff
      )
      assert badcm.inverse() == None
  
imports: from copy import copy
  from types import SimpleNamespace
  import numpy
  from ..coordinate_map import AffineTransform, AxisError, CoordinateMap, CoordMapMaker, CoordMapMakerError, _as_coordinate_map, _fix0, append_io_dim, axmap, compose, drop_io_dim, equivalent, input_axis_index, io_axis_indices, orth_axes, product, shifted_domain_origin, shifted_range_origin
  from ..coordinate_system import CoordinateSystem, CoordinateSystemError, CoordSysMaker
  import pytest
  from numpy.testing import assert_almost_equal, assert_array_equal
label_desc: Use image node_id 20 for calling a global function with example usage: test_affine_inverse() without return types