def METHOD_NAME(ys, x):
    # computes log_abs_det_jacobian of y w.r.t. x
    return (
        torch.stack([torch.autograd.grad(y, (x,), retain_graph=True)[0] for y in ys])
        .det()
        .abs()
        .log()
    )