def METHOD_NAME(self):
    """Test the execution of a custom state measurement."""
    class MyMeasurement(StateMeasurement):
        def process_state(self, state, wire_order):
            return qml.math.sum(state)
    dev = qml.device("default.qubit.legacy", wires=2)
    @qml.qnode(dev)
    def circuit():
        return MyMeasurement()
    assert circuit() == 1