class_docstr: Tests for the transform specs using the QNode
class_docstr_tok: ["Tests","for","the","transform","specs","using","the","QNode"]
docstr: Test specs works when state returned
docstr_tok: ["Test","specs","works","when","state","returned"]
code: def test_specs_state(self, diff_method, len_info):
      """Test specs works when state returned"""
  
      dev = qml.device("default.qubit", wires=2)
  
      @qml.qnode(dev, diff_method=diff_method)
      def circuit():
          return qml.state()
  
      info_func = qml.specs(circuit)
      info = info_func()
      assert len(info) == len_info
  
      assert info["resources"] == qml.resource.Resources(
          gate_types=defaultdict(int)
      )
  
      assert info["num_observables"] == 1
      assert info["num_diagonalizing_gates"] == 0
  
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 3 for calling the TestSpecsTransform obj's underlying member method code with example usage: obj.test_specs_state(diff_method, len_info) and returns: qml