code: def test_is_HNF():
      M = DM([[3, 2, 1], [0, 2, 1], [0, 0, 1]], ZZ)
      M1 = DM([[3, 2, 1], [0, -2, 1], [0, 0, 1]], ZZ)
      M2 = DM([[3, 2, 3], [0, 2, 1], [0, 0, 1]], ZZ)
      assert is_sq_maxrank_HNF(M) is True
      assert is_sq_maxrank_HNF(M1) is False
      assert is_sq_maxrank_HNF(M2) is False
  
imports: from sympy.abc import x, zeta
  from sympy.polys import Poly, cyclotomic_poly
  from sympy.polys.domains import FF, QQ, ZZ
  from sympy.polys.matrices import DomainMatrix, DM
  from sympy.polys.numberfields.exceptions import ClosureFailure, MissingUnityError, StructureError
  from sympy.polys.numberfields.modules import Module, ModuleElement, ModuleEndomorphism, PowerBasis, PowerBasisElement, find_min_poly, is_sq_maxrank_HNF, make_mod_elt, to_col
  from sympy.polys.numberfields.utilities import is_int
  from sympy.polys.polyerrors import UnificationFailed
  from sympy.testing.pytest import raises
label_desc: Use image node_id 30 for calling a global function with example usage: test_is_HNF() without return types