code: def test_run_somaflow(tmpdir):
      tmpdir.chdir()
  
      pipe = pe.Workflow(name="pipe")
      mod1 = pe.Node(interface=SomaTestInterface(), name="mod1")
      mod2 = pe.MapNode(
          interface=SomaTestInterface(),
          iterfield=["input1"],
          name="mod2",
      )
      pipe.connect([(mod1, mod2, [("output1", "input1")])])
      pipe.base_dir = os.getcwd()
      mod1.inputs.input1 = 1
      execgraph = pipe.run(plugin="SomaFlow")
      names = [
          ".".join((node._hierarchy, node.name))
          for node in execgraph.nodes()
      ]
      node = list(execgraph.nodes())[names.index("pipe.mod1")]
      result = node.get_output("output1")
      assert result == [1, 1]
  
file_path: nipype/nipype/pipeline/plugins/tests/test_somaflow.py
imports: import os
  from time import sleep
  import nipype.interfaces.base
  import pytest
  import nipype.pipeline.engine
  from nipype.pipeline.plugins.somaflow import soma_not_loaded
label_desc: Use image node_id 1 for calling a global function with example usage: test_run_somaflow(tmpdir) without return types