Implement a thread-safe caching mechanism for model inference results.
Implement run_cached_inference(requests, capacity), where each request is a map containing a key and the result produced by inference. Return results in request order. The cache must use least-recently-used eviction, return the cached result for repeated keys, and remain safe when its cache operations are called concurrently. The supplied result is used only when the key is absent.
Constraints: 0 <= requests.length <= 100, 1 <= capacity <= 100, and keys are strings.
def run_cached_inference(requests, capacity):