package com.example.cache;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CompletionException;
import java.util.concurrent.atomic.AtomicBoolean;
'use strict';
function dedupeAsync(producer, keyFn) {
const pending = new Map();
const resolveKey = keyFn || ((...args) => JSON.stringify(args));
import asyncio
from typing import Awaitable, Callable, Dict, TypeVar
T = TypeVar("T")