'Indent text by prepending a given prefix to each line.'

def indent(self, text, prefix='                '):

    if (not text):
        return ''
    lines = split(text, '\n')
    lines = map((lambda line, prefix=prefix: (prefix + line)), lines)
    if lines:
        lines[(-1)] = rstrip(lines[(-1)])
    return join(lines, '\n')
