import textwrap


def format_tooltip(text, *args, **kwargs):
    """
    Wrapper around textwrap.fill that preserves newline characters
    """
    return '\n'.join(textwrap.fill(t, *args, **kwargs) \
                     for t in text.splitlines())