class_docstr: Tests for the SPSA gradient transform
class_docstr_tok: ["Tests","for","the","SPSA","gradient","transform"]
docstr: Test that the correct ouput and warning is generated in the absence of any trainable
  parameters
docstr_tok: ["Test","that","the","correct","ouput","and","warning","is","generated","in","the","absence","of","any","trainable","parameters"]
code: def test_no_trainable_params_qnode_autograd(self):
      """Test that the correct ouput and warning is generated in the absence of any trainable
      parameters"""
      dev = qml.device(
          "default.qubit", wires=2, shots=default_shot_vector
      )
  
      @qml.qnode(dev)
      def circuit(weights):
          qml.RX(weights[0], wires=0)
          qml.RY(weights[1], wires=0)
          return qml.expval(qml.PauliZ(0) @ qml.PauliZ(1))
  
      weights = [0.1, 0.2]
      with pytest.raises(
          qml.QuantumFunctionError, match="No trainable parameters."
      ):
          spsa_grad(circuit, h=h_val)(weights)
  
imports: import numpy
  import pytest
  from pennylane import numpy
  import pennylane
  from pennylane.gradients import spsa_grad
  from pennylane.devices import DefaultQubitLegacy
  from pennylane.measurements import Shots
  from pennylane.operation import Observable, AnyWires
label_desc: Use image node_id 5 for calling the TestSpsaGradient obj's underlying member method code with example usage: obj.test_no_trainable_params_qnode_autograd() and returns: qml