code: def test_create_graph():
      source1 = Stream(stream_name="source1")
      source2 = Stream(stream_name="source2")
  
      n1 = source1.zip(source2)
      n2 = n1.map(add)
      s = n2.sink(source1.emit)
  
      g = nx.DiGraph()
      create_graph(n2, g)
      for t in [hash(a) for a in [source1, source2, n1, n2, s]]:
          assert t in g
      for e in [
          (hash(a), hash(b))
          for a, b in [(source1, n1), (source2, n1), (n1, n2), (n2, s)]
      ]:
          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 1 for calling a global function with example usage: test_create_graph() without return types