'Iterate the nested structure as a list of strings with appropriate
indentations for each level of structure.'

def iter_lines(self, filter=None, shift=0):

    element = 0
    for item in self:
        if (not isinstance(item, _ErrList)):
            if ((filter is None) or filter(item)):
                (yield (item[0], indent(item[1], shift=shift)))
    for item in self:
        if isinstance(item, _ErrList):
            next_lines = item.iter_lines(filter=filter, shift=(shift + 1))
            try:
                first_line = next(next_lines)
            except StopIteration:
                first_line = None
            if (first_line is not None):
                if self.unit:
                    (yield (None, indent(u'{}    {}:'.format(self.unit, element), shift=shift)))
                (yield first_line)
            for line in next_lines:
                (yield line)
            element += 1
