Python implementation of nested sampling