code: def _check_matrix_matches_decomp(op):
      """Check that if both the matrix and decomposition are defined, they match."""
      if op.has_matrix and op.has_decomposition:
          mat = op.matrix()
          decomp_mat = qml.matrix(
              qml.tape.QuantumScript(op.decomposition()),
              wire_order=op.wires,
          )
          failure_comment = f"matrix and matrix from decomposition must match. Got \n{mat}\n\n {decomp_mat}"
          assert qml.math.allclose(mat, decomp_mat), failure_comment
  
file_path: pennylane/pennylane/ops/functions/assert_valid.py
imports: from string import ascii_lowercase
  import copy
  import pickle
  import numpy
  import pennylane
  from pennylane.operation import EigvalsUndefinedError
label_desc: Use image node_id 4 for calling a global function with example usage: _check_matrix_matches_decomp(op) without return types