def METHOD_NAME(x, y, z, flatten=True):
    x = np.asarray(x)
    y = np.asarray(y)
    z = np.asarray(z)
    px = sum([coeffsx[i, :] * x[:, None]**i for i in range(degree+1)])
    py = sum([coeffsy[i, :] * y[:, None]**i for i in range(degree+1)])
    pz = sum([coeffsz[i, :] * z[:, None]**i for i in range(degree+1)])
    res = px*py*pz
    if flatten:
        return (np.ascontiguousarray(res)).flatten()
    else:
        return res