code: def test_create_file():
      source1 = Stream(stream_name="source1")
      source2 = Stream(stream_name="source2")
  
      n1 = source1.zip(source2)
      n2 = n1.map(add).scan(mul).map(lambda x: x + 1)
      n2.sink(source1.emit)
  
      with tmpfile(extension="png") as fn:
          visualize(n1, filename=fn)
          assert os.path.exists(fn)
  
      with tmpfile(extension="svg") as fn:
          n1.visualize(filename=fn, rankdir="LR")
          assert os.path.exists(fn)
  
      with tmpfile(extension="dot") as fn:
          n1.visualize(filename=fn, rankdir="LR")
          with open(fn) as f:
              text = f.read()
  
          for word in [
              "rankdir",
              "source1",
              "source2",
              "zip",
              "map",
              "add",
              "shape=box",
              "shape=ellipse",
          ]:
              assert word in text
  
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 3 for calling a global function with example usage: test_create_file() without return types