human
I wrote the below code

    def _process_line(line):
        '\n                                helper    function    that    distributes    extra    spaces    between    words.    The    number\n                                of    gaps    is    nwords    -    1    but    must    be    at    least    1    for    single-word    lines.    We\n                                distribute    odd    spaces    randomly    to    one    of    the    gaps.\n                                '
        line_rest = (width - (wlen + ngaps))
        gap = '    '
        if (line_rest > 0):
            if (align == 'l'):
                line[(-1)] += ('    ' * line_rest)
            elif (align == 'r'):
                line[0] = (('    ' * line_rest) + line[0])
            elif (align == 'c'):
                pad = ('    ' * (line_rest // 2))
                line[0] = (pad + line[0])
                line[(-1)] = ((line[(-1)] + pad) + ('    ' * (line_rest % 2)))
            else:
                gap += ('    ' * (line_rest // max(1, ngaps)))
                rest_gap = (line_rest % max(1, ngaps))
                for i in range(rest_gap):
                    line[i] += '    '
        return gap.join(line)
    paragraphs = re.split('\n\\s*?\n', text, re.MULTILINE)
    words = []
    for (ip, paragraph) in enumerate(paragraphs):
        if (ip > 0):
            words.append(('\n\n', 0))
        words.extend(((word, len(word)) for word in paragraph.split()))
    (ngaps, wlen, line) = (0, 0, [])
    lines = []
    while words:
        if (not line):
            word = words.pop(0)
            wlen = word[1]
            line.append(word[0])
        elif (((words[0][1] + wlen) + ngaps) >= width):
            lines.append(_process_line(line))
            (ngaps, wlen, line) = (0, 0, [])
        else:
            word = words.pop(0)
            line.append(word[0])
            if (word[1] == 0):
                lines.append(_process_line(line))
                (ngaps, wlen, line) = (0, 0, [])
            else:
                wlen += word[1]
               ...

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

def justify(text, width=_DEFAULT_WIDTH, align='f', indent=0):