human
I wrote the below code

    def ranges0(*args):
        return [qfun(args[1], args[0]), rfun(args[1], args[0])]
    def ranges1(*args):
        return [gfun(args[0]), hfun(args[0])]
    ranges = [ranges0, ranges1, [a, b]]
    return nquad(func, ranges, args=args, opts={'epsabs': epsabs, 'epsrel': epsrel})

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

def tplquad(func, a, b, gfun, hfun, qfun, rfun, args=(), epsabs=1.49e-08, epsrel=1.49e-08):