class_docstr: Tests for the transform specs using the QNode
class_docstr_tok: ["Tests","for","the","transform","specs","using","the","QNode"]
docstr: Test that a gradient transform is properly labelled
docstr_tok: ["Test","that","a","gradient","transform","is","properly","labelled"]
code: def test_gradient_transform(self):
      """Test that a gradient transform is properly labelled"""
      dev = qml.device("default.qubit", wires=2)
  
      @qml.qnode(dev, diff_method=qml.gradients.param_shift)
      def circuit():
          return qml.probs(wires=0)
  
      with pytest.warns(
          UserWarning,
          match="gradient of a tape with no trainable parameters",
      ):
          info = qml.specs(circuit)()
      assert (
          info["diff_method"]
          == "pennylane.gradients.parameter_shift.param_shift"
      )
      assert (
          info["gradient_fn"]
          == "pennylane.gradients.parameter_shift.param_shift"
      )
  
file_path: pennylane/tests/resource/test_specs.py
imports: from typing import Sequence, Callable
  from collections import defaultdict
  from contextlib import nullcontext
  import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 7 for calling the TestSpecsTransform obj's underlying member method code with example usage: obj.test_gradient_transform() and returns: qml