def get_doc_str(fun):
    """Get the doc string for a function and return a default if none is found."""
    if fun.__doc__:
        return '\n'.join([line.strip() for line in fun.__doc__.split('\n')])
    else:
        return 'No documentation provided for %s()' % fun.__name__