human
I wrote the below code

    for code in codes:
        if (not isinstance(code, int)):
            raise TypeError(('All    status    codes    should    be    type    int.    %s    is    not    valid' % repr(code)))
    def error_codes_mapper(code, message, environ, global_conf, codes):
        if (code in codes):
            return codes[code]
        else:
            return None
    return RecursiveMiddleware(StatusBasedForward(app, error_codes_mapper, codes=codes))

What's a good function header?

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

def forward(app, codes):