class_docstr: Tests for the CustomMeasurement class.
class_docstr_tok: ["Tests","for","the","CustomMeasurement","class","."]
docstr: Test the execution of a custom measurement.
code: def test_custom_measurement(self, device):
      """Test the execution of a custom measurement."""
      dev = device(2)
      _skip_test_for_braket(dev)
  
      class MyMeasurement(MeasurementTransform):
          """Dummy measurement transform."""
  
          def process(self, tape, device):
              return 1
  
      @qml.qnode(dev)
      def circuit():
          qml.PauliX(0)
          return MyMeasurement()
  
      assert circuit() == 1
  
imports: import pytest
  from flaky import flaky
  from scipy.sparse import csr_matrix
  import pennylane
  from pennylane import numpy
  from pennylane.measurements import ClassicalShadowMP, MeasurementTransform, SampleMeasurement, SampleMP, StateMeasurement, StateMP
label_desc: Use image node_id 1 for calling the TestCustomMeasurement obj's underlying member method code with example usage: obj.test_custom_measurement(device) and returns: MyMeasurement, int