'Write fragments to the logging method.'

def write(self, fragments, still_buffered, method):

    buffered_text = ('' if (not still_buffered) else ''.join(still_buffered).strip())
    joined_text = ''.join(fragments)
    if ((not buffered_text) and (not joined_text.strip())):
        return
    if buffered_text:
        more_text = ('<still    buffering    line>:    %s\n' % buffered_text)
    else:
        more_text = ''
    lines = joined_text.split('\n')
    indented_text = ('        %s' % '\n        '.join(lines))
    method('<begin    from    %s>:\n%s\n%s<end    from    %s>\n', self.__label, indented_text, more_text, self.__label)
