class_docstr: Test integration of the gradient transform decorator
class_docstr_tok: ["Test","integration","of","the","gradient","transform","decorator"]
docstr: Test that a gradient transform decorating a QNode
  acts correctly
docstr_tok: ["Test","that","a","gradient","transform","decorating","a","QNode","acts","correctly"]
code: def test_decorator(self, tol):
      """Test that a gradient transform decorating a QNode
      acts correctly"""
      dev = qml.device("default.qubit", wires=2)
  
      @qml.gradients.param_shift
      @qml.qnode(dev)
      def circuit(weights):
          qml.RX(weights[0], wires=[0])
          qml.RY(weights[1], wires=[1])
          qml.CNOT(wires=[0, 1])
          return qml.expval(qml.PauliZ(0)), qml.var(qml.PauliX(1))
  
      w = np.array([0.543, -0.654], requires_grad=True)
      res = circuit(w)
  
      x, y = w
      expected = np.array(
          [[-np.sin(x), 0], [0, -2 * np.cos(y) * np.sin(y)]]
      )
      assert np.allclose(res, expected, atol=tol, rtol=0)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.gradients.gradient_transform import _find_gradient_methods, _validate_gradient_methods, choose_trainable_params
label_desc: Use image node_id 4 for calling the TestGradientTransformIntegration obj's underlying member method code with example usage: obj.test_decorator(tol) and returns: qml,  qml