A Python implementation of the Rabin-Miller method to test primality