code: def test_traverser():
      term = (add, (inc, 1), (double, (inc, 1), 2))
      t = Traverser(term)
      t2 = t.copy()
      assert t.current == add
      t.next()
      assert t.current == inc
      # Ensure copies aren't advanced when the original advances
      assert t2.current == add
      t.skip()
      assert t.current == double
      t.next()
      assert t.current == inc
      assert list(t2) == [add, inc, 1, double, inc, 1, 2]
  
file_path: lightning-flash/tests/core/serve/test_dag/test_rewrite.py
imports: import pytest
  from flash.core.serve.dag.rewrite import VAR, RewriteRule, RuleSet, Traverser, args, head
  from flash.core.utilities.imports import _TOPIC_SERVE_AVAILABLE
label_desc: Use image node_id 6 for calling a global function with example usage: test_traverser() without return types