<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def color_gen_map( colors: Iterable[Tuple[int, int, int]], indexes: Iterable[int] ) -> List[Color]: """Return a smoothly defined scale of colors. If ``indexes`` is [0, 3, 9] for example, the first color from ``colors`` will be returned at 0, the 2nd will be at 3, and the 3rd will be at 9. All in-betweens will be filled with a gradient. Args: colors (Iterable[Union[Tuple[int, int, int], Sequence[int]]]):
 Array of colors to be sampled. indexes (Iterable[int]):
 A list of indexes. Returns: List[Color]: A list of Color instances. Example: [Color(0, 0, 0), Color(51, 25, 0), Color(102, 51, 0), \ Color(153, 76, 0), Color(204, 102, 0), Color(255, 128, 0)] """

    ccolors = ffi.new("TCOD_color_t[]", colors)
    cindexes = ffi.new("int[]", indexes)
    cres = ffi.new("TCOD_color_t[]", max(indexes) + 1)
    lib.TCOD_color_gen_map(cres, len(ccolors), ccolors, cindexes)
    return [Color._new_from_cdata(cdata) for cdata in cres]