human
I wrote the below code

    if (width is None):
        width = 80
    text = textwrap.dedent(text)
    def needs_wrapping(line):
        return (not line[0].isspace())
    wrapped_text = ''
    for (do_wrap, lines) in itertools.groupby(text.splitlines(True), key=needs_wrapping):
        paragraph = ''.join(lines)
        if do_wrap:
            paragraph = textwrap.fill(paragraph, width)
        wrapped_text += paragraph
    return wrapped_text

What's a good function header?

=====
Here's a good function header?
assistant
#Here's a good function header.

def rewrap(text, width=None):