code: def to_protobuf(self) -> p2pd_pb2.StreamInfo:
      pb_msg = p2pd_pb2.StreamInfo(
          peer=self.peer_id.to_bytes(),
          addr=self.addr.to_bytes(),
          proto=self.proto,
      )
      return pb_msg
  
imports: import hashlib
  from typing import Any, Sequence, Union
  import base58
  import multihash
  from cryptography.hazmat.primitives import serialization
  from multiaddr import Multiaddr, protocols
  from hivemind.proto import crypto_pb2, p2pd_pb2
label_desc: Use image node_id 3 for calling the StreamInfo obj's underlying member method code with example usage: obj.to_protobuf() and returns: pb_msg