class_docstr: Runs arbitrary function as an interface
  
  Examples
  --------
  
  >>> func = 'def func(arg1, arg2=5): return arg1 + arg2'
  >>> fi = Function(input_names=['arg1', 'arg2'], output_names=['out'])
  >>> fi.inputs.function_str = func
  >>> res = fi.run(arg1=1)
  >>> res.outputs.out
  6
code: def _add_output_traits(self, base):
      undefined_traits = {}
      for key in self._output_names:
          base.add_trait(key, traits.Any)
          undefined_traits[key] = Undefined
      base.trait_set(trait_change_notify=False, **undefined_traits)
      return base
  
file_path: nipype/nipype/interfaces/utility/wrappers.py
imports: from ...None import logging
  from ..base import traits, DynamicTraitedSpec, Undefined, isdefined, BaseInterfaceInputSpec
  from ..io import IOBase, add_traits
  from ...utils.filemanip import ensure_list
  from ...utils.functions import getsource, create_function_from_source
label_desc: Use image node_id 3 for calling the Function obj's underlying member method code with example usage: obj._add_output_traits(base) and returns: base