'Split the Label into two or more parts.
Parameters
parts : int >= 2 | tuple of str | str
Number of labels to create (default is 2), or tuple of strings
specifying label names for new labels (from posterior to anterior),
or \'contiguous\' to split the label into connected components.
If a number or \'contiguous\' is specified, names of the new labels
will be the input label\'s name with div1, div2 etc. appended.
subject : None | str
Subject which this label belongs to (needed to locate surface file;
should only be specified if it is not specified in the label).
subjects_dir : None | str
Path to SUBJECTS_DIR if it is not set in the environment.
freesurfer : bool
By default (``False``) ``split_label`` uses an algorithm that is
slightly optimized for performance and numerical precision. Set
``freesurfer`` to ``True`` in order to replicate label splits from
FreeSurfer\'s ``mris_divide_parcellation``.
Returns
labels : list of Label (len = n_parts)
The labels, starting from the lowest to the highest end of the
projection axis.
Notes
If using \'contiguous\' split, you must ensure that the label being split
uses the same triangular resolution as the surface mesh files in
``subjects_dir`` Also, some small fringe labels may be returned that
are close (but not connected) to the large components.
The spatial split finds the label\'s principal eigen-axis on the
spherical surface, projects all label vertex coordinates onto this
axis, and divides them at regular spatial intervals.'

def split(self, parts=2, subject=None, subjects_dir=None, freesurfer=False):

    if (isinstance(parts, string_types) and (parts == 'contiguous')):
        return _split_label_contig(self, subject, subjects_dir)
    elif isinstance(parts, (tuple, int)):
        return split_label(self, parts, subject, subjects_dir, freesurfer)
    else:
        raise ValueError(("Need    integer,    tuple    of    strings,    or    string    ('contiguous').    Got    %s)" % type(parts)))
