class_docstr: Test conversion of queues to DAGs
class_docstr_tok: ["Test","conversion","of","queues","to","DAGs"]
docstr: Test ``_in_topological_order`` method returns the expected result.
docstr_tok: ["Test","``","_in_topological_order","``","method","returns","the","expected","result","."]
code: def test_in_topological_order_example(self, ops, obs):
      """
      Test ``_in_topological_order`` method returns the expected result.
      """
      circuit = CircuitGraph(ops, obs, Wires([0, 1, 2]))
  
      to = circuit._in_topological_order(ops)
  
      to_expected = [
          qml.RZ(0.35, wires=[2]),
          qml.Hadamard(wires=[2]),
          qml.RY(0.35, wires=[1]),
          qml.RX(0.43, wires=[0]),
          qml.CNOT(wires=[0, 1]),
          qml.PauliX(wires=[1]),
          qml.CNOT(wires=[2, 0]),
      ]
  
      assert str(to) == str(to_expected)
  
imports: import io
  import contextlib
  import numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.resource import ResourcesOperation, Resources
  from pennylane.circuit_graph import CircuitGraph
  from pennylane.wires import Wires
label_desc: Use image node_id 4 for calling the TestCircuitGraph obj's underlying member method code with example usage: obj.test_in_topological_order_example(ops, obs) without return types