def METHOD_NAME(a, y):
    # Inverse to the regularized lower incomplete gamma function.
    # pytorch does not have a native implementation of gammaincinv, so we
    # have to use scipy.
    return convert_device(
        torch.as_tensor(
            scipy.special.gammaincinv(a.cpu().numpy(),
                                      y.cpu().numpy()),
            device='cpu'))