code: def test_ids_depth():
      for i in range(100):
          ids = [
              random.randint(0, 4096)
              for i in range(random.randint(1, 256))
          ]
          ours = DHTID.longest_common_prefix_length(*map(DHTID, ids))
  
          ids_bitstr = [
              "".join(
                  bin(bite)[2:].rjust(8, "0")
                  for bite in uid.to_bytes(20, "big")
              )
              for uid in ids
          ]
          reference = len(shared_prefix(*ids_bitstr))
          assert (
              reference == ours
          ), f"ours {ours} != reference {reference}, ids: {ids}"
  
file_path: hivemind/tests/test_routing.py
imports: import heapq
  import operator
  import random
  from itertools import chain, zip_longest
  from hivemind.dht.routing import DHTID, RoutingTable
  from hivemind.utils.networking import LOCALHOST
label_desc: Use image node_id 2 for calling a global function with example usage: test_ids_depth() without return types