code: def test_SDM_rref():
      # More tests are in test_rref.py
  
      A = SDM(
          {0: {0: QQ(1), 1: QQ(2)}, 1: {0: QQ(3), 1: QQ(4)}}, (2, 2), QQ
      )
      A_rref = SDM({0: {0: QQ(1)}, 1: {1: QQ(1)}}, (2, 2), QQ)
      assert A.rref() == (A_rref, [0, 1])
  
      A = SDM(
          {0: {0: QQ(1), 1: QQ(2), 2: QQ(2)}, 1: {0: QQ(3), 2: QQ(4)}},
          (2, 3),
          ZZ,
      )
      A_rref = SDM(
          {
              0: {0: QQ(1, 1), 2: QQ(4, 3)},
              1: {1: QQ(1, 1), 2: QQ(1, 3)},
          },
          (2, 3),
          QQ,
      )
      assert A.rref() == (A_rref, [0, 1])
  
imports: from itertools import product
  from sympy.core.singleton import S
  from sympy.external.gmpy import GROUND_TYPES
  from sympy.testing.pytest import raises
  from sympy.polys.domains import QQ, ZZ, EXRAW
  from sympy.polys.matrices.sdm import SDM
  from sympy.polys.matrices.ddm import DDM
  from sympy.polys.matrices.exceptions import DMBadInputError, DMDomainError, DMShapeError
label_desc: Use image node_id 38 for calling a global function with example usage: test_SDM_rref() without return types