A Tripadvisor surface editor receives a binary pixel matrix and a sequence of taps. Each tap at (row, column) turns off that pixel and its orthogonally adjacent pixels: up, down, left, and right. Pixels outside the matrix are ignored. Apply taps in order.
In the same function, implement an LRU cache for surface metadata. Process put and get operations, returning the values produced by get in order. A put for an existing key updates its value and makes the key most recently used. When the cache exceeds capacity, evict the least recently used key.
Return the final matrix and all cache lookup results.
Implement process_surface(matrix, taps, capacity, cache_operations), where matrix is a list of lists containing 0 or 1, taps is a list of [row, column] coordinates, capacity is a positive integer, and each cache operation is a dictionary such as {"op": "put", "key": "hotel", "value": 4} or {"op": "get", "key": "hotel"}. Return [final_matrix, get_results], using None for a cache miss.
def process_surface(matrix, taps, capacity, cache_operations):