This is a very fast and cheap estimate of p-value density at one, with a slight positive bias,
because it is only an unbiased estimate of density at the bin center, not the right bin edge.
But this is usually ignorable. The function is defined as:
function(p,bw=.2,trunc=TRUE)
if(trunc)max(min(1,mean(p>=1-bw)/bw),0) else mean(p>=1-bw)/bw
.