human
Here's a good function header given the following:
I wrote the below code

    jenkins_statuses = map(partial(get_jenkins_info, jenkins_session), statuses)
    map(print, map(format_status, zip(statuses, map(itemgetter(0), jenkins_statuses))))
    candidates = filter((lambda x: (x[1][0] in [JenkinsResults.FAILED, JenkinsResults.NOTRUN])), zip(statuses, jenkins_statuses))
    def exceeded_retries(context):
        return (retry_counts[context] > max_retries)
    retried_too_many = filter((lambda x: exceeded_retries(x[0]['context'])), candidates)
    def format_retried_to_many(job):
        return '{}    retried    {}    times    and    still    failing,    not    retrying.    You    can    look    at    the    build    and    retry    yourself    if    it    is    a    spurious    problem,    and    this    script    will    notice    that    you    have    done    so.'.format(job['target_url'], retry_counts[job['context']])
    map(print, map((lambda x: format_retried_to_many(x[0])), retried_too_many))
    to_retry = filter((lambda x: (x not in retried_too_many)), candidates)
    for job in to_retry:
        retry(jenkins_session, job[0]['target_url'], job[1][1])
        retry_counts[job[0]['context']] += 1

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

def maybe_retry_jobs(statuses, retry_counts, max_retries, jenkins_session):