<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def random_set_distribution( rnd: Optional[tcod.random.Random], dist: int ) -> None: """Change the distribution mode of a random number generator. Args: rnd (Optional[Random]):
 A Random instance, or None to use the default. dist (int):
 The distribution mode to use. Should be DISTRIBUTION_*. """

    lib.TCOD_random_set_distribution(rnd.random_c if rnd else ffi.NULL, dist)