code: def test_localstorage_freeze():
      d = DHTLocalStorage(maxsize=2)
  
      with d.freeze():
          d.store(
              DHTID.generate("key1"), b"val1", get_dht_time() + 0.01
          )
          assert DHTID.generate("key1") in d
          time.sleep(0.03)
          assert DHTID.generate("key1") in d
      assert DHTID.generate("key1") not in d
  
      with d.freeze():
          d.store(DHTID.generate("key1"), b"val1", get_dht_time() + 1)
          d.store(DHTID.generate("key2"), b"val2", get_dht_time() + 2)
          d.store(
              DHTID.generate("key3"), b"val3", get_dht_time() + 3
          )  # key3 will push key1 out due to maxsize
          assert DHTID.generate("key1") in d
      assert DHTID.generate("key1") not in d
  
file_path: hivemind/tests/test_dht_storage.py
imports: import time
  from hivemind.dht.storage import DHTID, DHTLocalStorage, DictionaryDHTValue
  from hivemind.utils.serializer import MSGPackSerializer
  from hivemind.utils.timed_storage import get_dht_time
label_desc: Use image node_id 8 for calling a global function with example usage: test_localstorage_freeze() without return types