<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_percentages(file_list, n_tasks=9, file_name="color_percent.png", intensification_factor=1.2):
 """ Creates an image in which each cell in the avida grid is represented as a square of 9 sub-cells. Each of these 9 sub-cells represents a different task, and is colored such that cooler colors represent more complex tasks. The saturation of each sub-cell indicates the percentage of grids in the given data-set in which the organism in that cell could perform the corresponding task. Inputs: file_list - list of names of of avida task grid files to be used in making figure. intensification_factor (default 1.2):
 A number to multiply the percentage of organisms doing a task by in order to increase visibility. This can be useful in cases where a lot of the percentages are too low to be easily visualized. Returns: Grid indicating appropriate color values for images. """

    # Load data
    data = task_percentages(load_grid_data(file_list))

    # Initialize grid
    grid = [[]] * len(data)*3
    for i in range(len(grid)):
        grid[i] = [[]]*len(data[0])*3

    # Color grid
    for i in range(len(data)):
        for j in range(len(data[i])):
            for k in range(3):  # create grid of sub-cells
                for l in range(3):
                    if len(data[i][j]) > k*3+l:
                        # build a color in matplotlib's preferred hsv format
                        arr = np.zeros((1, 1, 3))
                        arr[0, 0, 1] = float(data[i][j][k*3 + l]) \
                            * intensification_factor  # saturate based on data
                        arr[0, 0, 0] = (k*3 + l)/9.0  # hue based on task
                        arr[0, 0, 2] = 1  # value is always 1
                        rgb = matplotlib.colors.hsv_to_rgb(arr)  # convert rgb

                        grid[i*3+k][j*3+l] = list(rgb[0][0])
                    else:
                        grid[i*3+k][j*3+l] = (1, 1, 1, 1)

    return make_imshow_plot(grid, "colorpercentages")