class_docstr: Contains attributes which store key resources such as number of gates, number of wires, shots,
  depth and gate types.
  
  Args:
      num_wires (int): number of qubits
      num_gates (int): number of gates
      gate_types (dict): dictionary storing operation names (str) as keys
          and the number of times they are used in the circuit (int) as values
      gate_sizes (dict): dictionary storing the number of :math:`n` qubit gates in the circuit
          as a key-value pair where :math:`n` is the key and the number of occurances is the value
      depth (int): the depth of the circuit defined as the maximum number of non-parallel operations
      shots (Shots): number of samples to generate
  
  .. details::
  
      The resources being tracked can be accessed as class attributes.
      Additionally, the :code:`Resources` instance can be nicely displayed in the console.
  
      **Example**
  
      >>> r = Resources(num_wires=2, num_gates=2, gate_types={'Hadamard': 1, 'CNOT':1}, gate_sizes={1: 1, 2: 1}, depth=2)
      >>> print(r)
      wires: 2
      gates: 2
      depth: 2
      shots: Shots(total=None)
      gate_types:
      {'Hadamard': 1, 'CNOT': 1}
      gate_sizes:
      {1: 1, 2: 1}
code: def __str__(self):
      keys = ["wires", "gates", "depth"]
      vals = [self.num_wires, self.num_gates, self.depth]
      items = "\n".join([str(i) for i in zip(keys, vals)])
      items = items.replace("('", "")
      items = items.replace("',", ":")
      items = items.replace(")", "")
  
      items += f"\nshots: {str(self.shots)}"
  
      gate_type_str = ", ".join(
          [
              f"'{gate_name}': {count}"
              for gate_name, count in self.gate_types.items()
          ]
      )
      items += "\ngate_types:\n{" + gate_type_str + "}"
  
      gate_size_str = ", ".join(
          [
              f"{n_gate}: {count}"
              for n_gate, count in self.gate_sizes.items()
          ]
      )
      items += "\ngate_sizes:\n{" + gate_size_str + "}"
      return items
  
file_path: pennylane/pennylane/resource/resource.py
imports: from abc import abstractmethod
  from collections import defaultdict
  from dataclasses import dataclass, field
  from pennylane.operation import Operation
  from pennylane.measurements import Shots
label_desc: Use image node_id 1 for calling the Resources obj's underlying member method code with example usage: obj.__str__() and returns: items