code: def test_no_measure():
      """Test that failing to specify a measurement
      raises an exception"""
      dev = qml.device("default.qubit.legacy", wires=2)
  
      @qml.qnode(dev)
      def circuit(x):
          qml.RX(x, wires=0)
          return qml.PauliY(0)
  
      with pytest.raises(
          qml.QuantumFunctionError,
          match="must return either a single measurement",
      ):
          _ = circuit(0.65)
  
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 1 for calling a global function with example usage: test_no_measure() and returns: qml