code: def test_peer_id():
      assert PEER_ID.to_bytes() == PEER_ID_BYTES
      assert PEER_ID.to_string() == PEER_ID_STRING
  
      peer_id_2 = PeerID.from_base58(PEER_ID_STRING)
      assert peer_id_2.to_bytes() == PEER_ID_BYTES
      assert peer_id_2.to_string() == PEER_ID_STRING
      assert PEER_ID == peer_id_2
      peer_id_3 = PeerID.from_base58(
          "QmbmfNDEth7Ucvjuxiw3SP3E4PoJzbk7g4Ge6ZDigbCsNp"
      )
      assert PEER_ID != peer_id_3
  
      a = PeerID.from_base58("bob")
      b = PeerID.from_base58("eve")
      assert a < b and b > a and not (b < a) and not (a > b)
      with pytest.raises(TypeError):
          assert a < object()
  
imports: import asyncio
  import io
  from contextlib import AsyncExitStack
  import pytest
  from google.protobuf.message import EncodeError
  from multiaddr import Multiaddr, protocols
  from hivemind.p2p.p2p_daemon_bindings.control import ControlClient, DaemonConnector, parse_conn_protocol
  from hivemind.p2p.p2p_daemon_bindings.datastructures import PeerID, PeerInfo, StreamInfo
  from hivemind.p2p.p2p_daemon_bindings.utils import ControlFailure, raise_if_failed, read_pbmsg_safe, read_unsigned_varint, write_pbmsg, write_unsigned_varint
  from hivemind.proto import p2pd_pb2
  from test_utils.p2p_daemon import connect_safe, make_p2pd_pair_unix
label_desc: Use image node_id 3 for calling a global function with example usage: test_peer_id() without return types