<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def linear_color_map(values, color_range=None):
 """ Linearly interpolate between two colors. If colors are not specified the function will interpolate between 0.0 values as red and 1.0 as green. Parameters values : (n, ) float Values to interpolate color_range : None, or (2, 4) uint8 What colors should extrema be set to Returns colors : (n, 4) uint8 RGBA colors for interpolated values """


    if color_range is None:
        color_range = np.array([[255, 0, 0, 255],
                                [0, 255, 0, 255]],
                               dtype=np.uint8)
    else:
        color_range = np.asanyarray(color_range,
                                    dtype=np.uint8)

    if color_range.shape != (2, 4):
        raise ValueError('color_range must be RGBA (2, 4)')

    # float 1D array clamped to 0.0 - 1.0
    values = np.clip(np.asanyarray(
        values, dtype=np.float64).ravel(),
        0.0, 1.0).reshape((-1, 1))

    # the stacked component colors
    color = [np.ones((len(values), 4)) * c
             for c in color_range.astype(np.float64)]

    # interpolated colors
    colors = (color[1] * values) + (color[0] * (1.0 - values))

    # rounded and set to correct data type
    colors = np.round(colors).astype(np.uint8)

    return colors