code: def test_equivalent():
      ijk = CoordinateSystem("ijk")
      xyz = CoordinateSystem("xyz")
      T = np.random.standard_normal((4, 4))
      T[-1] = [0, 0, 0, 1]
      A = AffineTransform(ijk, xyz, T)
  
      # now, cycle through
      # all possible permutations of
      # 'ijk' and 'xyz' and confirm that
      # the mapping is equivalent
  
      assert not equivalent(A, A.renamed_domain({"i": "foo"}))
  
      try:
          import itertools
  
          for pijk in itertools.permutations("ijk"):
              for pxyz in itertools.permutations("xyz"):
                  B = A.reordered_domain(pijk).reordered_range(pxyz)
                  assert equivalent(A, B)
      except (ImportError, AttributeError):
          # just do some if we can't find itertools, or if itertools
          # doesn't have permutations
          for pijk in ["ikj", "kij"]:
              for pxyz in ["xzy", "yxz"]:
                  B = A.reordered_domain(pijk).reordered_range(pxyz)
                  assert equivalent(A, B)
  
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 29 for calling a global function with example usage: test_equivalent() without return types