code: def get_y_basis_circuit(
      wires, shots, interface="autograd", device="default.qubit.legacy"
  ):
      """
      Return a QNode that prepares the |+i>|+i>...|+i> state and performs a classical shadow measurement
      """
      if device is not None:
          dev = qml.device(device, wires=wires, shots=shots)
      else:
          dev = qml.device(
              "default.qubit.legacy", wires=wires, shots=shots
          )
  
          # make the device call the superclass method to switch between the general qubit device and device specific implementations (i.e. for default qubit)
          dev.classical_shadow = super(type(dev), dev).classical_shadow
  
      @qml.qnode(dev, interface=interface)
      def circuit():
          for wire in range(wires):
              qml.Hadamard(wire)
              qml.RZ(np.pi / 2, wire)
          return qml.classical_shadow(wires=range(wires))
  
      return circuit
  
imports: import autograd.numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.measurements import Shots
label_desc: Use image node_id 3 for calling a global function with example usage: get_y_basis_circuit(wires, shots, interface, device) and returns: circuit, qml