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 user can calculation specifications for a different max
  expansion parameter.
docstr_tok: ["Test","that","a","user","can","calculation","specifications","for","a","different","max","expansion","parameter","."]
code: def test_max_expansion(self):
      """Test that a user can calculation specifications for a different max
      expansion parameter."""
  
      circuit, params = self.make_qnode_and_params("device")
  
      assert circuit.max_expansion == 10
      info = qml.specs(circuit, max_expansion=0)(params)
      assert circuit.max_expansion == 10
  
      assert len(info) == 11
  
      gate_sizes = defaultdict(int, {5: 1})
      gate_types = defaultdict(int, {"BasicEntanglerLayers": 1})
      expected_resources = qml.resource.Resources(
          num_wires=5,
          num_gates=1,
          gate_types=gate_types,
          gate_sizes=gate_sizes,
          depth=1,
      )
      assert info["resources"] == expected_resources
      assert info["num_observables"] == 1
      assert info["num_device_wires"] == 5
      assert info["device_name"] == "default.qubit"
      assert info["diff_method"] == "best"
      assert info["gradient_fn"] == "backprop"
  
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 5 for calling the TestSpecsTransform obj's underlying member method code with example usage: obj.test_max_expansion() without return types