code: def run_node(
      initial_peers: List[Multiaddr], info_queue: mp.Queue, **kwargs
  ):
      if asyncio.get_event_loop().is_running():
          asyncio.get_event_loop().stop()  # if we're in jupyter, get rid of its built-in event loop
          asyncio.set_event_loop(asyncio.new_event_loop())
      loop = asyncio.get_event_loop()
  
      node = loop.run_until_complete(
          DHTNode.create(initial_peers=initial_peers, **kwargs)
      )
      maddrs = loop.run_until_complete(node.get_visible_maddrs())
  
      info_queue.put((node.node_id, node.peer_id, maddrs))
  
      async def shutdown():
          await node.shutdown()
          loop.stop()
  
      loop.add_signal_handler(
          signal.SIGTERM, lambda: loop.create_task(shutdown())
      )
      loop.run_forever()
  
file_path: hivemind/tests/test_utils/dht_swarms.py
imports: import asyncio
  import multiprocessing
  import random
  import signal
  import threading
  from typing import Dict, List, Tuple
  from multiaddr import Multiaddr
  from hivemind.dht import DHT
  from hivemind.dht.node import DHTID, DHTNode
  from hivemind.p2p import PeerID
label_desc: Use image node_id 1 for calling a global function with example usage: run_node(initial_peers, info_queue) without return types