'Wrap doc string at 72 characters and format nicely'

def format_doc(self, **kwargs):

    indent = kwargs.get('indent', 0)
    if (not self.__doc__):
        return ''
    doc = re.sub('\\s+', '    ', self.__doc__)
    lines = textwrap.wrap(doc, 72)
    results = StringIO()
    for line in lines:
        results.write(((('    ' * indent) + line) + '\n'))
    return results.getvalue()
