human
I wrote the below code

    def _generator():
        it = iter(text.split('    '))
        word = it.next()
        (yield word)
        pos = ((len(word) - word.rfind('\n')) - 1)
        for word in it:
            if ('\n' in word):
                lines = word.split('\n')
            else:
                lines = (word,)
            pos += (len(lines[0]) + 1)
            if (pos > width):
                (yield '\n')
                pos = len(lines[(-1)])
            else:
                (yield '    ')
                if (len(lines) > 1):
                    pos = len(lines[(-1)])
            (yield word)
    return ''.join(_generator())

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

def wrap(text, width):