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 tapes
docstr_tok: ["Test","that","the","transform","works","for","tapes"]
code: def test_replace_tape(self):
      """Test that the transform works for tapes"""
      tape = qml.tape.QuantumScript([], [qml.classical_shadow(wires=0)])
      new_tapes, _ = _replace_obs(tape, qml.probs, wires=0)
  
      assert len(new_tapes) == 1
      assert new_tapes[0].operations == []
      assert len(new_tapes[0].observables) == 1
      assert isinstance(
          new_tapes[0].observables[0], qml.measurements.ProbabilityMP
      )
  
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 1 for calling the TestReplaceObs obj's underlying member method code with example usage: obj.test_replace_tape() without return types