code: def test_expansion():
      pipe1 = pe.Workflow(name="pipe1")
      mod1 = pe.Node(interface=EngineTestInterface(), name="mod1")
      mod2 = pe.Node(interface=EngineTestInterface(), name="mod2")
      pipe1.connect([(mod1, mod2, [("output1", "input2")])])
      pipe2 = pe.Workflow(name="pipe2")
      mod3 = pe.Node(interface=EngineTestInterface(), name="mod3")
      mod4 = pe.Node(interface=EngineTestInterface(), name="mod4")
      pipe2.connect([(mod3, mod4, [("output1", "input2")])])
      pipe3 = pe.Workflow(name="pipe3")
      pipe3.connect([(pipe1, pipe2, [("mod2.output1", "mod4.input1")])])
      pipe4 = pe.Workflow(name="pipe4")
      mod5 = pe.Node(interface=EngineTestInterface(), name="mod5")
      pipe4.add_nodes([mod5])
      pipe5 = pe.Workflow(name="pipe5")
      pipe5.add_nodes([pipe4])
      pipe6 = pe.Workflow(name="pipe6")
      pipe6.connect(
          [
              (
                  pipe5,
                  pipe3,
                  [("pipe4.mod5.output1", "pipe2.mod3.input1")],
              )
          ]
      )
  
      pipe6._flatgraph = pipe6._create_flat_graph()
  
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 4 for calling a global function with example usage: test_expansion() without return types