def METHOD_NAME(ctx, p, q, types, coeffs, z, maxterms=6000, **kwargs):
    coeffs = list(coeffs)
    num = range(p)
    den = range(p,p+q)
    tol = ctx.eps
    s = t = 1.0
    k = 0
    while 1:
        for i in num: t *= (coeffs[i]+k)
        for i in den: t /= (coeffs[i]+k)
        k += 1; t /= k; t *= z; s += t
        if abs(t) < tol:
            return s
        if k > maxterms:
            raise ctx.NoConvergence