def get_average_brightness(block, size, gradation_step):
    """
    Get average brightness of image
    param block: mosaic block size
    param size: size
    param gradation_step: gradation of gray
    return int
     >>> get_average_brightness(np.ones((3, 3, 3)) * 200, 2, 15)
     195

    >>> get_average_brightness(np.ones((3, 3, 3)) * 100, 2, 15)
    90

    >>> get_average_brightness(np.ones((3, 3, 3)) * 100, 6, 6)
    24

    >>> get_average_brightness(np.ones((10, 10, 3)) * 100, 6, 6)
    96
    """

    average_color = (block[:size, :size].sum() / 3) // size ** 2
    res = int(average_color // gradation_step) * gradation_step
    return res