code: def execute_task(pckld_task, node_config, updatehash):
      from socket import gethostname
      from traceback import format_exc
      from nipype import config, logging
  
      traceback = None
      result = None
      import os
  
      cwd = os.getcwd()
      try:
          config.update_config(node_config)
          logging.update_logging(config)
          from pickle import loads
  
          task = loads(pckld_task)
          result = task.run(updatehash=updatehash)
      except:
          traceback = format_exc()
          from pickle import loads
  
          task = loads(pckld_task)
          result = task.result
      os.chdir(cwd)
      return result, traceback, gethostname()
  
file_path: nipype/nipype/pipeline/plugins/ipython.py
imports: from pickle import dumps
  import sys
  from .base import DistributedPluginBase, logger, report_crash
label_desc: Use image node_id 1 for calling a global function with example usage: execute_task(pckld_task, node_config, updatehash) and returns: result,  traceback,  gethostname