@contextmanager
def thread_local():
    ident = get_ident()
    storage[ident] = local = {}
    yield local
    del storage[ident]
A context manager for safely creating and deleting the thread-local
dataset/ETHPy150Open cosmic-api/cosmic.py/cosmic/globals.py/thread_local