code: def test_maxsize_cache():
      d = DHTLocalStorage(maxsize=2)
      d.store(DHTID.generate("key1a"), b"val1a", get_dht_time() + 1)
      d.store(DHTID.generate("key1b"), b"val1b", get_dht_time() + 1)
      d.store(DHTID.generate("key1a"), b"val1a2", get_dht_time() + 2)
      d.store(DHTID.generate("key2"), b"val2", get_dht_time() + 200)
      assert (
          d.get(DHTID.generate("key2"))[0] == b"val2"
      ), "Value with bigger exp. time must be kept"
      assert (
          d.get(DHTID.generate("key1a"))[0] == b"val1a2"
      ), "Value with bigger exp. time must be kept"
      assert (
          d.get(DHTID.generate("key1b")) is None
      ), "Value with less exp time, must be deleted"
  
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 5 for calling a global function with example usage: test_maxsize_cache() without return types