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 acts on QNodes
  correctly when multiple QNode arguments are classically processed
docstr_tok: ["Test","that","a","gradient","transform","acts","on","QNodes","correctly","when","multiple","QNode","arguments","are","classically","processed"]
code: def test_classical_processing_multiple_arguments(self, tol):
      """Test that a gradient transform acts on QNodes
      correctly when multiple QNode arguments are classically processed
      """
      dev = qml.device("default.qubit", wires=2)
  
      @qml.qnode(dev)
      def circuit(data, weights):
          qml.RY(np.cos(data), wires=0)
          qml.RX(weights[0] ** 2, wires=[0])
          qml.RY(weights[1], wires=[1])
          qml.CNOT(wires=[0, 1])
          return qml.expval(qml.PauliZ(0))
  
      # set d as non-differentiable
      d = np.array(0.56, requires_grad=False)
      w = np.array([0.543, -0.654], requires_grad=True)
      x, _ = w
  
      res = qml.gradients.param_shift(circuit)(d, w)
  
      expected = np.array(
          [-2 * x * np.cos(np.cos(d)) * np.sin(x**2), 0]
      )
      assert np.allclose(res, expected, atol=tol, rtol=0)
  
      # set d as differentiable
      d = np.array(0.56, requires_grad=True)
      w = np.array([0.543, -0.654], requires_grad=True)
  
      res = qml.gradients.param_shift(circuit)(d, w)
  
      expected_dd = np.cos(x**2) * np.sin(d) * np.sin(np.cos(d))
      expected_dw = np.array(
          [-2 * x * np.cos(np.cos(d)) * np.sin(x**2), 0]
      )
      assert np.allclose(res[0], expected_dd, atol=tol, rtol=0)
      assert np.allclose(res[1], expected_dw, 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 15 for calling the TestGradientTransformIntegration obj's underlying member method code with example usage: obj.test_classical_processing_multiple_arguments(tol) and returns: qml