code: def test_stream_info():
      proto = "123"
      si = StreamInfo(PEER_ID, MADDR, proto)
      assert si.peer_id == PEER_ID
      assert si.addr == MADDR
      assert si.proto == proto
      pb_si = si.to_protobuf()
      assert pb_si.peer == PEER_ID.to_bytes()
      assert pb_si.addr == MADDR.to_bytes()
      assert pb_si.proto == si.proto
      si_1 = StreamInfo.from_protobuf(pb_si)
      assert si_1.peer_id == PEER_ID
      assert si_1.addr == MADDR
      assert si_1.proto == proto
  
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 4 for calling a global function with example usage: test_stream_info() without return types