code: def test_count_resources(ops_and_shots, expected_resources):
      """Test the count resources method."""
      ops, shots = ops_and_shots
      computed_resources = _count_resources(
          QuantumScript(ops=ops, shots=shots)
      )
      assert computed_resources == expected_resources
  
imports: from dataclasses import FrozenInstanceError
  from collections import defaultdict
  import pytest
  import pennylane
  from pennylane.operation import Operation
  from pennylane.tape import QuantumScript
  from pennylane.resource.resource import Resources, ResourcesOperation, _count_resources
  from pennylane.measurements import Shots
label_desc: Use image node_id 1 for calling a global function with example usage: test_count_resources(ops_and_shots, expected_resources) without return types