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 with multiple parameters
  in both the tape and the QNode correctly
docstr_tok: ["Test","that","a","gradient","transform","acts","on","QNodes","with","multiple","parameters","in","both","the","tape","and","the","QNode","correctly"]
code: def test_acting_on_qnodes_multi_param_multi_arg(self, shots, atol):
      """Test that a gradient transform acts on QNodes with multiple parameters
      in both the tape and the QNode correctly"""
      np.random.seed(234)
      dev = qml.device("default.qubit", wires=2, shots=shots)
  
      @qml.qnode(dev)
      def circuit(weight0, weight1):
          qml.RX(weight0, wires=[0])
          qml.RY(weight1[0], wires=[1])
          qml.CNOT(wires=[0, 1])
          return qml.expval(qml.PauliZ(0)), qml.var(qml.PauliX(1))
  
      grad_fn = qml.gradients.param_shift(circuit)
  
      w = [
          np.array(0.543, requires_grad=True),
          np.array([-0.654], requires_grad=True),
      ]
      res = grad_fn(*w)
      assert circuit.interface == "auto"
      x, (y,) = w
      expected = (
          np.array([-np.sin(x), 0]),
          np.array([[0], [-2 * np.cos(y) * np.sin(y)]]),
      )
      if isinstance(shots, list):
          assert isinstance(res, tuple) and len(res) == len(shots)
          for _res in res:
              assert isinstance(_res, tuple) and len(_res) == 2
              assert all(
                  np.allclose(r, e, atol=atol, rtol=0)
                  for r, e in zip(_res, expected)
              )
      else:
          assert isinstance(res, tuple) and len(res) == 2
          assert all(
              np.allclose(r, e, atol=atol, rtol=0)
              for r, e in zip(res, expected)
          )
  
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 3 for calling the TestGradientTransformIntegration obj's underlying member method code with example usage: obj.test_acting_on_qnodes_multi_param_multi_arg(shots, atol) and returns: qml,  qml