code: def test_localstorage_top():
      d = DHTLocalStorage(maxsize=3)
      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() + 4)
      assert (
          d.top()[0] == DHTID.generate("key1")
          and d.top()[1].value == b"val1"
      )
  
      d.store(DHTID.generate("key1"), b"val1_new", get_dht_time() + 3)
      assert (
          d.top()[0] == DHTID.generate("key2")
          and d.top()[1].value == b"val2"
      )
  
      del d[DHTID.generate("key2")]
      assert (
          d.top()[0] == DHTID.generate("key1")
          and d.top()[1].value == b"val1_new"
      )
      d.store(DHTID.generate("key2"), b"val2_new", get_dht_time() + 5)
      d.store(
          DHTID.generate("key4"), b"val4", get_dht_time() + 6
      )  # key4 will push out key1 due to maxsize
  
      assert (
          d.top()[0] == DHTID.generate("key3")
          and d.top()[1].value == b"val3"
      )
  
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 6 for calling a global function with example usage: test_localstorage_top() without return types