code: def test_ddm_irref():
      # Empty matrix
      A = []
      Ar = []
      pivots = []
      assert ddm_irref(A) == pivots
      assert A == Ar
  
      # Standard square case
      A = [[QQ(0), QQ(1)], [QQ(1), QQ(1)]]
      Ar = [[QQ(1), QQ(0)], [QQ(0), QQ(1)]]
      pivots = [0, 1]
      assert ddm_irref(A) == pivots
      assert A == Ar
  
      # m < n  case
      A = [[QQ(1), QQ(2), QQ(1)], [QQ(3), QQ(4), QQ(1)]]
      Ar = [[QQ(1), QQ(0), QQ(-1)], [QQ(0), QQ(1), QQ(1)]]
      pivots = [0, 1]
      assert ddm_irref(A) == pivots
      assert A == Ar
  
      # same m < n  but reversed
      A = [[QQ(3), QQ(4), QQ(1)], [QQ(1), QQ(2), QQ(1)]]
      Ar = [[QQ(1), QQ(0), QQ(-1)], [QQ(0), QQ(1), QQ(1)]]
      pivots = [0, 1]
      assert ddm_irref(A) == pivots
      assert A == Ar
  
      # m > n case
      A = [[QQ(1), QQ(0)], [QQ(1), QQ(3)], [QQ(0), QQ(1)]]
      Ar = [[QQ(1), QQ(0)], [QQ(0), QQ(1)], [QQ(0), QQ(0)]]
      pivots = [0, 1]
      assert ddm_irref(A) == pivots
      assert A == Ar
  
      # Example with missing pivot
      A = [[QQ(1), QQ(0), QQ(1)], [QQ(3), QQ(0), QQ(1)]]
      Ar = [[QQ(1), QQ(0), QQ(0)], [QQ(0), QQ(0), QQ(1)]]
      pivots = [0, 2]
      assert ddm_irref(A) == pivots
      assert A == Ar
  
      # Example with missing pivot and no replacement
      A = [[QQ(0), QQ(1)], [QQ(0), QQ(2)], [QQ(1), QQ(0)]]
      Ar = [[QQ(1), QQ(0)], [QQ(0), QQ(1)], [QQ(0), QQ(0)]]
      pivots = [0, 1]
      assert ddm_irref(A) == pivots
      assert A == Ar
  
file_path: sympy/sympy/polys/matrices/tests/test_dense.py
imports: from sympy.testing.pytest import raises
  from sympy.polys import ZZ, QQ
  from sympy.polys.matrices.ddm import DDM
  from sympy.polys.matrices.dense import ddm_transpose, ddm_iadd, ddm_isub, ddm_ineg, ddm_imatmul, ddm_imul, ddm_irref, ddm_idet, ddm_iinv, ddm_ilu, ddm_ilu_split, ddm_ilu_solve, ddm_berk
  from sympy.polys.matrices.exceptions import DMDomainError, DMNonInvertibleMatrixError, DMNonSquareMatrixError, DMShapeError
label_desc: Use image node_id 7 for calling a global function with example usage: test_ddm_irref() without return types