def get_average(pixels):
    """
    Given a list of pixels, finds the average red, blue, and green values

    Input:
        pixels (List[Pixel]): list of pixels to be averaged
    Returns:
        rgb (List[int]): list of average red, green, blue values across pixels respectively

    Assumes you are returning in the order: [red, green, blue]

    """
    # calculate the average pixel for rea, green and blue colors
    pixel_red_sum = 0            # create a box for red pixel
    pixel_green_sum = 0          # create a box for green pixel
    pixel_blue_sum = 0           # create a box for blue pixel
    n = 0
    # sum up each color pixels
    for i in range(len(pixels)):
        pixel_red_sum += pixels[i].red
        pixel_green_sum += pixels[i].green
        pixel_blue_sum += pixels[i].blue
        n += 1                   # count how many pixels are there
    rgb = [int(pixel_red_sum / n), int(pixel_green_sum / n), int(pixel_blue_sum / n)]   # calculate the average
    return rgb