<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def heightmap_rain_erosion( hm: np.ndarray, nbDrops: int, erosionCoef: float, sedimentationCoef: float, rnd: Optional[tcod.random.Random] = None, ) -> None: """Simulate the effect of rain drops on the terrain, resulting in erosion. ``nbDrops`` should be at least hm.size. Args: hm (numpy.ndarray):
 A numpy.ndarray formatted for heightmap functions. nbDrops (int):
 Number of rain drops to simulate. erosionCoef (float):
 Amount of ground eroded on the drop's path. sedimentationCoef (float):
 Amount of ground deposited when the drops stops to flow. rnd (Optional[Random]):
 A tcod.Random instance, or None. """

    lib.TCOD_heightmap_rain_erosion(
        _heightmap_cdata(hm),
        nbDrops,
        erosionCoef,
        sedimentationCoef,
        rnd.random_c if rnd else ffi.NULL,
    )