code: def test_2mods(iterables, expected):
      pipe = pe.Workflow(name="pipe")
      mod1 = pe.Node(interface=EngineTestInterface(), name="mod1")
      mod2 = pe.Node(interface=EngineTestInterface(), name="mod2")
      for nr in ["1", "2"]:
          setattr(eval("mod" + nr), "iterables", iterables[nr])
      pipe.connect([(mod1, mod2, [("output1", "input2")])])
      pipe._flatgraph = pipe._create_flat_graph()
      pipe._execgraph = pe.generate_expanded_graph(
          deepcopy(pipe._flatgraph)
      )
      assert len(pipe._execgraph.nodes()) == expected[0]
      assert len(pipe._execgraph.edges()) == expected[1]
  
imports: from copy import deepcopy
  from glob import glob
  import os
  import pytest
  from ...None import engine
  from .test_base import EngineTestInterface
  import networkx
label_desc: Use image node_id 2 for calling a global function with example usage: test_2mods(iterables, expected) without return types