import typing as t
from _typeshed import Incomplete
from threading import RLock as RLock, Thread as Thread

class CountMinSketch:
    m: Incomplete
    d: Incomplete
    sketch: Incomplete
    lock: bool
    def __init__(self, m: int, d: int) -> None: ...
    def add(self, x: t.Hashable) -> None: ...
    def query(self, x: t.Hashable) -> int: ...
    def __getitem__(self, x: t.Hashable) -> int: ...
