class_docstr: Test integration of the gradient transform decorator
class_docstr_tok: ["Test","integration","of","the","gradient","transform","decorator"]
docstr: Test that the gradient transform acts on QNodes
  correctly when the QNode contains a template
docstr_tok: ["Test","that","the","gradient","transform","acts","on","QNodes","correctly","when","the","QNode","contains","a","template"]
code: def test_template_integration(self, strategy, tol):
      """Test that the gradient transform acts on QNodes
      correctly when the QNode contains a template"""
      dev = qml.device("default.qubit", wires=3)
  
      @qml.qnode(dev, expansion_strategy=strategy)
      def circuit(weights):
          qml.templates.StronglyEntanglingLayers(
              weights, wires=[0, 1, 2]
          )
          return qml.probs(wires=[0, 1])
  
      weights = np.ones([2, 3, 3], dtype=np.float64, requires_grad=True)
      res = qml.gradients.param_shift(circuit)(weights)
      assert res.shape == (4, 2, 3, 3)
  
      expected = qml.jacobian(circuit)(weights)
      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 17 for calling the TestGradientTransformIntegration obj's underlying member method code with example usage: obj.test_template_integration(strategy, tol) and returns: qml