'Return a string containing a pretty-printed version of this
decision tree.  Each line in this string corresponds to a
single decision tree node or leaf, and indentation is used to
display the structure of the decision tree.'

def pretty_format(self, width=70, prefix=u'', depth=4):

    if (self._fname is None):
        n = ((width - len(prefix)) - 15)
        return u'{0}{1}    {2}\n'.format(prefix, (u'.' * n), self._label)
    s = u''
    for (i, (fval, result)) in enumerate(sorted(self._decisions.items())):
        hdr = u'{0}{1}={2}?    '.format(prefix, self._fname, fval)
        n = ((width - 15) - len(hdr))
        s += u'{0}{1}    {2}\n'.format(hdr, (u'.' * n), result._label)
        if ((result._fname is not None) and (depth > 1)):
            s += result.pretty_format(width, (prefix + u'        '), (depth - 1))
    if (self._default is not None):
        n = ((width - len(prefix)) - 21)
        s += u'{0}else:    {1}    {2}\n'.format(prefix, (u'.' * n), self._default._label)
        if ((self._default._fname is not None) and (depth > 1)):
            s += self._default.pretty_format(width, (prefix + u'        '), (depth - 1))
    return s
