Creates (probable) prime number of given size

    :param bits: size of number to generate
    :return: prime number of given size

def get_prime(bits):
    """Creates (probable) prime number of given size

    :param bits: size of number to generate
    :return: prime number of given size
    """
    while True:
        num = random.randrange(2 ** (bits - 1), 2 ** bits)
        if Integer(str(num)).is_probably_prime():
            return num