human
I wrote the below code

    def _check_args(a1, a2, theta):
        condth = ((theta > 0) and (theta <= 1))
        conda1 = ((a1 >= 0) and (a1 <= 1))
        conda2 = ((a2 >= 0) and (a2 <= 1))
        return (condth and conda1 and conda2)
    if (not np.all(_check_args(a1, a2, theta))):
        raise ValueError('invalid    args')
    transf = ((1 - a1) * (1 - t))
    transf += ((1 - a2) * t)
    transf += ((((a1 * t) ** (1.0 / theta)) + ((a2 * (1 - t)) ** (1.0 / theta))) ** theta)
    return transf

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

def transform_tawn(t, a1, a2, theta):