human
I wrote the below code

    MAX_REDIRECTS = 5
    @functools.wraps(func)
    def wrapped(self, method, url, body, headers):
        for i in range(MAX_REDIRECTS):
            try:
                return func(self, method, url, body, headers)
            except exception.RedirectException as redirect:
                if (redirect.url is None):
                    raise exception.InvalidRedirect()
                url = redirect.url
        raise exception.MaxRedirectsExceeded(redirects=MAX_REDIRECTS)
    return wrapped

What's a good function header?

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

def handle_redirects(func):