code: def test_shape_unrecognized_error():
      """Test that querying the shape of a measurement process with an
      unrecognized return type raises an error."""
      dev = qml.device("default.qubit", wires=2)
      mp = NotValidMeasurement()
      with pytest.raises(
          qml.QuantumFunctionError,
          match="The shape of the measurement NotValidMeasurement is not defined",
      ):
          mp.shape(dev, Shots(None))
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane.measurements import ClassicalShadowMP, Counts, CountsMP, Expectation, ExpectationMP, MeasurementProcess, MeasurementTransform, MeasurementValue, MidMeasure, MidMeasureMP, MutualInfoMP, PurityMP, Probability, ProbabilityMP, Sample, SampleMeasurement, SampleMP, ShadowExpvalMP, Shots, State, StateMeasurement, StateMP, Variance, VarianceMP, VnEntropyMP, expval, sample, var
  from pennylane.operation import DecompositionUndefinedError
  from pennylane.queuing import AnnotatedQueue
  from pennylane.wires import Wires
label_desc: Use image node_id 4 for calling a global function with example usage: test_shape_unrecognized_error() without return types