def random_get_int(rnd: Optional[tcod.random.Random], mi: int, ma: int) -> int:
    """Return a random integer in the range: ``mi`` <= n <= ``ma``.

    The result is affected by calls to :any:`random_set_distribution`.

    Args:
        rnd (Optional[Random]): A Random instance, or None to use the default.
        low (int): The lower bound of the random range, inclusive.
        high (int): The upper bound of the random range, inclusive.

    Returns:
        int: A random integer in the range ``mi`` <= n <= ``ma``.
    """
    return int(
        lib.TCOD_random_get_int(rnd.random_c if rnd else ffi.NULL, mi, ma)
    )