class_docstr: Test that the _replace_obs transform works as expected
class_docstr_tok: ["Test","that","the","_replace_obs","transform","works","as","expected"]
docstr: Test that the transform works for QNodes
docstr_tok: ["Test","that","the","transform","works","for","QNodes"]
code: def test_replace_qnode(self):
      """Test that the transform works for QNodes"""
      circuit = hadamard_circuit(2, shots=1000)
      circuit = _replace_obs(circuit, qml.probs, wires=[0, 1])
      res = circuit()
  
      assert isinstance(res, np.ndarray)
      assert res.shape == (4,)
  
imports: from functools import partial
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.shadows.transforms import _replace_obs
label_desc: Use image node_id 2 for calling the TestReplaceObs obj's underlying member method code with example usage: obj.test_replace_qnode() without return types