class_docstr: Tests for annotating the return types of the statistics functions
class_docstr_tok: ["Tests","for","annotating","the","return","types","of","the","statistics","functions"]
docstr: Test that the return_type related info is updated for a measurement
  when called for an Tensor observable
docstr_tok: ["Test","that","the","return_type","related","info","is","updated","for","a","measurement","when","called","for","an","Tensor","observable"]
code: def test_annotating_tensor_return_type(
      self, op1, op2, stat_func, return_type
  ):
      """Test that the return_type related info is updated for a measurement
      when called for an Tensor observable"""
      with AnnotatedQueue() as q:
          A = op1(0)
          B = op2(1)
          tensor_op = A @ B
          stat_func(tensor_op)
  
      assert len(q.queue) == 1
      meas_proc = q.queue[0]
      assert isinstance(meas_proc, MeasurementProcess)
      assert meas_proc.return_type == return_type
  
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 3 for calling the TestStatisticsQueuing obj's underlying member method code with example usage: obj.test_annotating_tensor_return_type(op1, op2, stat_func, return_type) without return types