code: def test_canonicalize():
      X = MatrixSymbol("X", 2, 2)
      Y = MatrixSymbol("Y", 2, 2)
      with warns_deprecated_sympy():
          expr = HadamardProduct(X, check=False)
      assert isinstance(expr, HadamardProduct)
      expr2 = expr.doit()  # unpack is called
      assert isinstance(expr2, MatrixSymbol)
      Z = ZeroMatrix(2, 2)
      U = OneMatrix(2, 2)
      assert HadamardProduct(Z, X).doit() == Z
      assert HadamardProduct(U, X, X, U).doit() == HadamardPower(X, 2)
      assert HadamardProduct(X, U, Y).doit() == HadamardProduct(X, Y)
      assert HadamardProduct(X, Z, U, Y).doit() == Z
  
file_path: sympy/sympy/matrices/expressions/tests/test_hadamard.py
imports: from sympy.matrices.dense import Matrix, eye
  from sympy.matrices.exceptions import ShapeError
  from sympy.matrices.expressions.matadd import MatAdd
  from sympy.matrices.expressions.special import Identity, OneMatrix, ZeroMatrix
  from sympy.core import symbols
  from sympy.testing.pytest import raises, warns_deprecated_sympy
  from sympy.matrices import MatrixSymbol
  from sympy.matrices.expressions import HadamardProduct, hadamard_product, HadamardPower, hadamard_power
label_desc: Use image node_id 4 for calling a global function with example usage: test_canonicalize() without return types