code: def test_mapnode_expansion(tmpdir):
      tmpdir.chdir()
      from nipype import MapNode, Function
  
      def func1(in1):
          return in1 + 1
  
      mapnode = MapNode(
          Function(function=func1),
          iterfield="in1",
          name="mapnode",
          n_procs=2,
          mem_gb=2,
      )
      mapnode.inputs.in1 = [1, 2]
  
      for idx, node in mapnode._make_nodes():
          for attr in (
              "overwrite",
              "run_without_submitting",
              "plugin_args",
          ):
              assert getattr(node, attr) == getattr(mapnode, attr)
          for attr in ("_n_procs", "_mem_gb"):
              assert getattr(node, attr) == getattr(mapnode, attr)
  
imports: import os
  from copy import deepcopy
  import pytest
  from ....None import config
  from ....interfaces import utility
  from ....interfaces import base
  from ...None import engine
  from ..utils import merge_dict
  from .test_base import EngineTestInterface
  from .test_utils import UtilsTestInterface
label_desc: Use image node_id 6 for calling a global function with example usage: test_mapnode_expansion(tmpdir) and returns: unknown