class_docstr: Basic interface class to split lists into multiple outputs
  
  Examples
  --------
  
  >>> from nipype.interfaces.utility import Split
  >>> sp = Split()
  >>> _ = sp.inputs.trait_set(inlist=[1, 2, 3], splits=[2, 1])
  >>> out = sp.run()
  >>> out.outputs.out1
  [1, 2]
class_docstr_tok: ["Basic","interface","class","to","split","lists","into","multiple","outputs","Examples","--","--","--","--",">",">",">","from","nipype.interfaces.utility","import","Split",">",">",">","sp","=","Split","(",")",">",">",">","_","=","sp.inputs.trait_set","(","inlist=","[","1",",","2",",","3","]",",","splits=","[","2",",","1","]",")",">",">",">","out","=","sp.run","(",")",">",">",">","out.outputs.out1","[","1",",","2","]"]
code: def _list_outputs(self):
      outputs = self._outputs().get()
      if isdefined(self.inputs.splits):
          if sum(self.inputs.splits) != len(self.inputs.inlist):
              raise RuntimeError(
                  "sum of splits != num of list elements"
              )
          splits = [0]
          splits.extend(self.inputs.splits)
          splits = np.cumsum(splits)
          for i in range(len(splits) - 1):
              val = np.array(self.inputs.inlist, dtype=object)[
                  splits[i] : splits[i + 1]
              ].tolist()
              if self.inputs.squeeze and len(val) == 1:
                  val = val[0]
              outputs["out%d" % (i + 1)] = val
      return outputs
  
imports: import os
  import re
  import numpy
  from ..base import traits, TraitedSpec, DynamicTraitedSpec, File, Undefined, isdefined, OutputMultiPath, InputMultiPath, BaseInterface, BaseInterfaceInputSpec, Str, SimpleInterface
  from ..io import IOBase, add_traits
  from ...utils.filemanip import ensure_list, copyfile, split_filename
label_desc: Use image node_id 2 for calling the Split obj's underlying member method code with example usage: obj._list_outputs() and returns: outputs