class_docstr: Tests for the MeasurementTransform class.
class_docstr_tok: ["Tests","for","the","MeasurementTransform","class","."]
docstr: Test that the device can override a measurement process.
docstr_tok: ["Test","that","the","device","can","override","a","measurement","process","."]
code: def test_method_overriden_by_device(self):
      """Test that the device can override a measurement process."""
  
      dev = qml.device("default.qubit.legacy", wires=2, shots=1000)
  
      @qml.qnode(dev)
      def circuit():
          return qml.classical_shadow(wires=0)
  
      circuit.device.measurement_map[ClassicalShadowMP] = "test_method"
      circuit.device.test_method = lambda tape: 2
  
      assert circuit() == 2
  
file_path: pennylane/tests/measurements/legacy/test_measurements_legacy.py
imports: import pytest
  import pennylane
  from pennylane.measurements import ClassicalShadowMP, MeasurementProcess, MeasurementTransform, SampleMeasurement, SampleMP, Shots, StateMeasurement, StateMP, expval, var
label_desc: Use image node_id 2 for calling the TestMeasurementTransform obj's underlying member method code with example usage: obj.test_method_overriden_by_device() and returns: qml