<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def matplotlib_to_ginga_cmap(cm, name=None):
 """Convert matplotlib colormap to Ginga's."""

    if name is None:
        name = cm.name
    arr = cm(np.arange(0, min_cmap_len) / np.float(min_cmap_len - 1))
    clst = arr[:, 0:3]
    return ColorMap(name, clst)