nested sampling algorithm in python