class_docstr: Test conversion of queues to DAGs
class_docstr_tok: ["Test","conversion","of","queues","to","DAGs"]
docstr: Test that changing nodes in the graph may raise an error.
docstr_tok: ["Test","that","changing","nodes","in","the","graph","may","raise","an","error","."]
code: def test_update_node_error(self, ops, obs):
      """Test that changing nodes in the graph may raise an error."""
      circuit = CircuitGraph(ops, obs, Wires([0, 1, 2]))
      new = qml.RX(0.1, wires=0)
      new = qml.CNOT(wires=[0, 1])
      with pytest.raises(ValueError):
          circuit.update_node(ops[0], new)
  
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 6 for calling the TestCircuitGraph obj's underlying member method code with example usage: obj.test_update_node_error(ops, obs) without return types