code: def testTraverserCycle(self):
      a = nodes.apply_operation(
          _Constant, value="a", label="Constant[a]"
      )
      x_0 = nodes.apply_operation(_Identity, a, label="Identity[0]")
      x_1 = nodes.apply_operation(_Identity, x_0, label="Identity[1]")
      x_2 = nodes.apply_operation(_Identity, x_1, label="Identity[2]")
      x_0.parent_operation._inputs = (x_2,)
  
      mock_visitor = mock.MagicMock()
      mock_visitor.visit.return_value = ("x",)
  
      with self.assertRaisesWithLiteralMatch(
          AssertionError,
          "Cycle detected: [Identity[2], Identity[1], Identity[0], Identity[2]]",
      ):
          nodes.Traverser(mock_visitor).visit_value_node(x_2)
  
imports: import tensorflow
  from tensorflow_transform import nodes
  from tensorflow_transform import test_case
  from tfx_bsl.types import tfx_namedtuple
label_desc: Use image node_id 10 for calling the NodesTest obj's underlying member method code with example usage: obj.testTraverserCycle() without return types