code: def test_create_cyclic_graph():
      source1 = Stream(stream_name="source1")
      source2 = Stream(stream_name="source2")
  
      n1 = source1.zip(source2)
      n2 = n1.map(add)
      n2.connect(source1)
  
      g = nx.DiGraph()
      create_graph(n2, g)
      for t in [hash(a) for a in [source1, source2, n1, n2]]:
          assert t in g
      assert nx.find_cycle(g)
      for e in [
          (hash(a), hash(b))
          for a, b in [
              (source1, n1),
              (source2, n1),
              (n1, n2),
              (n2, source1),
          ]
      ]:
          assert e in g.edges()
  
file_path: streamz/streamz/tests/test_graph.py
imports: from operator import add, mul
  import os
  import pytest
  from streamz import Stream, create_graph, visualize
  from streamz.utils_test import tmpfile
  from ..graph import _clean_text
label_desc: Use image node_id 2 for calling a global function with example usage: test_create_cyclic_graph() without return types