code: def maddrs_to_peer_ids(maddrs: List[Multiaddr]) -> List[PeerID]:
      return list(
          {PeerID.from_base58(maddr["p2p"]) for maddr in maddrs}
      )
  
file_path: hivemind/tests/test_dht_protocol.py
imports: import asyncio
  import multiprocessing
  import random
  import signal
  from typing import List, Sequence, Tuple
  import pytest
  from multiaddr import Multiaddr
  import hivemind
  from hivemind import P2P, PeerID, get_dht_time, get_logger
  from hivemind.dht import DHTID
  from hivemind.dht.protocol import DHTProtocol
  from hivemind.dht.storage import DictionaryDHTValue
label_desc: Use image node_id 1 for calling a global function with example usage: maddrs_to_peer_ids(maddrs) and returns: list