code: def test_hermite_normal():
      m = Matrix(
          [[2, 7, 17, 29, 41], [3, 11, 19, 31, 43], [5, 13, 23, 37, 47]]
      )
      hnf = Matrix([[1, 0, 0], [0, 2, 1], [0, 0, 1]])
      assert hermite_normal_form(m) == hnf
  
      tr_hnf = Matrix(
          [
              [37, 0, 19],
              [222, -6, 113],
              [48, 0, 25],
              [0, 2, 1],
              [0, 0, 1],
          ]
      )
      assert hermite_normal_form(m.transpose()) == tr_hnf
  
      m = Matrix(
          [
              [8, 28, 68, 116, 164],
              [3, 11, 19, 31, 43],
              [5, 13, 23, 37, 47],
          ]
      )
      hnf = Matrix([[4, 0, 0], [0, 2, 1], [0, 0, 1]])
      assert hermite_normal_form(m) == hnf
      assert hermite_normal_form(m, D=8) == hnf
      assert hermite_normal_form(m, D=ZZ(8)) == hnf
      assert hermite_normal_form(m, D=Integer(8)) == hnf
  
      m = Matrix(
          [[10, 8, 6, 30, 2], [45, 36, 27, 18, 9], [5, 4, 3, 2, 1]]
      )
      hnf = Matrix([[26, 2], [0, 9], [0, 1]])
      assert hermite_normal_form(m) == hnf
  
      m = Matrix([[2, 7], [0, 0], [0, 0]])
      hnf = Matrix([[1], [0], [0]])
      assert hermite_normal_form(m) == hnf
  
file_path: sympy/sympy/matrices/tests/test_normalforms.py
imports: from sympy.testing.pytest import warns_deprecated_sympy
  from sympy.core.symbol import Symbol
  from sympy.polys.polytools import Poly
  from sympy.matrices import Matrix
  from sympy.matrices.normalforms import invariant_factors, smith_normal_form, hermite_normal_form
  from sympy.polys.domains import ZZ, QQ
  from sympy.core.numbers import Integer
label_desc: Use image node_id 3 for calling a global function with example usage: test_hermite_normal() without return types