class_docstr: Tests for the sum_expand transform
docstr: Test the grouping functionality
docstr_tok: ["Test","the","grouping","functionality"]
code: def test_grouping(self):
      """Test the grouping functionality"""
      S = qml.sum(
          qml.PauliZ(0),
          qml.s_prod(2, qml.PauliX(1)),
          qml.s_prod(3, qml.PauliX(0)),
      )
  
      with AnnotatedQueue() as q:
          qml.Hadamard(wires=0)
          qml.CNOT(wires=[0, 1])
          qml.PauliX(wires=2)
          qml.expval(S)
  
      qscript = QuantumScript.from_queue(q)
  
      tapes, _ = sum_expand(qscript, group=True)
      assert len(tapes) == 2
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.queuing import AnnotatedQueue
  from pennylane.tape import QuantumScript
  from pennylane.transforms import hamiltonian_expand, sum_expand
label_desc: Use image node_id 5 for calling the TestSumExpand obj's underlying member method code with example usage: obj.test_grouping() without return types