class_docstr: Tests that the spectrum is returned as expected.
docstr: Test that an error is thrown if the QNode has a ``MeasurementProcess``
  with an inadmissable ``return_type``.
docstr_tok: ["Test","that","an","error","is","thrown","if","the","QNode","has","a","``","MeasurementProcess","``","with","an","inadmissable","``","return_type","``","."]
code: def test_wrong_return_type_error(self, measurement):
      """Test that an error is thrown if the QNode has a ``MeasurementProcess``
      with an inadmissable ``return_type``."""
      dev = qml.device("default.qubit", wires=2)
  
      @qml.qnode(dev)
      def circuit(x):
          qml.RX(x, wires=0)
          return [qml.expval(qml.PauliX(1)), qml.apply(measurement)]
  
      with pytest.raises(
          ValueError,
          match=f"{measurement.__class__.__name__} is not supported",
      ):
          qnode_spectrum(circuit)(1.5)
  
imports: from collections import OrderedDict
  import numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.fourier.qnode_spectrum import _process_ids, qnode_spectrum
  from pennylane.measurements import SampleMP, StateMP, VarianceMP
label_desc: Use image node_id 7 for calling the TestCircuits obj's underlying member method code with example usage: obj.test_wrong_return_type_error(measurement) and returns: list