Python implementation of the Baillie-PSW probabilistic primality test.