code: def test_serial_input(tmpdir):
      tmpdir.chdir()
      wd = os.getcwd()
      from nipype import MapNode, Function, Workflow
  
      def func1(in1):
          return in1
  
      n1 = MapNode(
          Function(
              input_names=["in1"], output_names=["out"], function=func1
          ),
          iterfield=["in1"],
          name="n1",
      )
      n1.inputs.in1 = [1, 2, 3]
  
      w1 = Workflow(name="test")
      w1.base_dir = wd
      w1.add_nodes([n1])
      # set local check
      w1.config["execution"] = {
          "stop_on_first_crash": "true",
          "local_hash_check": "true",
          "crashdump_dir": wd,
          "poll_sleep_duration": 2,
      }
  
      # test output of num_subnodes method when serial is default (False)
      assert n1.num_subnodes() == len(n1.inputs.in1)
  
      # test running the workflow on default conditions
      w1.run(plugin="MultiProc")
  
      # test output of num_subnodes method when serial is True
      n1._serial = True
      assert n1.num_subnodes() == 1
  
      # test running the workflow on serial conditions
      w1.run(plugin="MultiProc")
  
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 14 for calling a global function with example usage: test_serial_input(tmpdir) and returns: in1