/**
 * Apply specified filter to each pixel of the image.
 *
 * @param image The image represented as a 2D list of pixels.
 * @param filter The type of color filter to apply.
 * @return The image after applying the specified filter.
 */
fun applyColorFilter(image: List<List<Int>>, filter: String): List<List<Int>> {

    val filteredImage = mutableListOf<List<Int>>()
    for (row in image) {
        val filteredRow = mutableListOf<Int>()
        for (pixel in row) {
            var filteredPixel: Int? = null

            // Apply filter to pixel
            // You need to fill in the missing code here

            filteredRow.add(filteredPixel!!)
        }
        filteredImage.add(filteredRow)
    }
    return filteredImage
}
/**
 * Apply specified filter to each pixel of the image.
 *
 * @param image The image represented as a 2D list of pixels.
 * @param filter The type of color filter to apply.
 * @return The image after applying the specified filter.
 */
fun applyColorFilter(image: List<List<Int>>, filter: String): List<List<Int>> {
/**
 * Apply specified filter to each pixel of the image.
 *
 * @param image The image represented as a 2D list of pixels.
 * @param filter The type of color filter to apply.
 * @return The image after applying the specified filter.
 */
fun applyColorFilter(image: List<List<Int>>, filter: String): List<List<Int>> {

    val filteredImage = mutableListOf<List<Int>>()
    for (row in image) {
        val filteredRow = mutableListOf<Int>()
        for (pixel in row) {
            var filteredPixel: Int? = null

            // Apply filter to pixel
            // You need to fill in the missing code here

            filteredRow.add(filteredPixel!!)
        }
        filteredImage.add(filteredRow)
    }
    return filteredImage
}