def getprime(nbits):
 while True:
  integer = rsa.randnum.read_random_int(nbits)
  integer |= 1
  if is_prime(integer):
   return integer

def getprime ( nbits ) : while True : integer = rsa . randnum . read_random_int ( nbits ) integer |= 1 if is_prime ( integer ) : return integer
returns a prime number that can be stored in nbits bits .