code: def test_not_an_observable(stat_func):
      """Test that a UserWarning is raised if the provided
      argument might not be hermitian."""
  
      dev = qml.device("default.qubit.legacy", wires=2)
  
      @qml.qnode(dev)
      def circuit():
          qml.RX(0.52, wires=0)
          return stat_func(qml.prod(qml.PauliX(0), qml.PauliZ(0)))
  
      with pytest.warns(
          UserWarning, match="Prod might not be hermitian."
      ):
          _ = circuit()
  
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 3 for calling a global function with example usage: test_not_an_observable(stat_func) and returns: stat_func