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 if the constituent components of a tensor operation are not
  found in the queue for annotation, they are not queued or annotated.
docstr_tok: ["Test","that","if","the","constituent","components","of","a","tensor","operation","are","not","found","in","the","queue","for","annotation",",","they","are","not","queued","or","annotated","."]
code: def test_queueing_tensor_observable(
      self, op1, op2, stat_func, return_type
  ):
      """Test that if the constituent components of a tensor operation are not
      found in the queue for annotation, they are not queued or annotated.
      """
      A = op1(0)
      B = op2(1)
  
      with AnnotatedQueue() as q:
          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 4 for calling the TestStatisticsQueuing obj's underlying member method code with example usage: obj.test_queueing_tensor_observable(op1, op2, stat_func, return_type) without return types