code: def build_qfunc_probs(wires):
      def qfunc(x, y, z):
          qml.Hadamard(wires=wires[0])
          qml.RZ(z, wires=wires[2])
          qml.CNOT(wires=[wires[2], wires[0]])
          qml.CNOT(wires=[wires[1], wires[0]])
          qml.RX(x, wires=wires[0])
          qml.CNOT(wires=[wires[0], wires[2]])
          qml.RZ(-z, wires=wires[2])
          qml.RX(y, wires=wires[0])
          qml.PauliY(wires=wires[2])
          qml.CY(wires=[wires[1], wires[2]])
          return qml.probs(wires=[0, 1])
  
      return qfunc
  
imports: from math import isclose
  import pytest
  from pennylane import numpy
  import pennylane
  from pennylane.transforms.transpile import transpile
label_desc: Use image node_id 1 for calling a global function with example usage: build_qfunc_probs(wires) and returns: qfunc, qml