human
I wrote the below code

    def _chunk_iter():
        offset = len(text)
        while True:
            offset -= (chunk_size * 1024)
            if (offset <= 0):
                break
            (yield (text[offset:], offset))
        (yield (text, 0))
    if isinstance(pattern, six.string_types):
        pattern = re.compile(pattern)
    for (chunk, offset) in _chunk_iter():
        matches = [match for match in pattern.finditer(chunk)]
        if matches:
            (start, end) = matches[(-1)].span()
            return ((offset + start), (offset + end))
    return None

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

def re_rsearch(pattern, text, chunk_size=1024):