code: def unpack_stream(stream: Iterator[Message]) -> Tuple[bytes, bytes]:
      for msg in stream:
          if msg.WhichOneof("instruction") == "header":
              # can be header in case of exceptions on server side
              assert (
                  msg.header.status
                  == rpc_messages.ResponseHeader.Status.ERROR
              )
              raise_exception(msg.header.exception)
              return
  
          assert msg.WhichOneof("instruction") == "message"
          msg = msg.message
  
          yield from unpack_helper(msg)
  
imports: import importlib
  import struct
  import json
  from typing import Iterator, Tuple, Union
  import aim.ext.transport.proto.remote_tracking_pb2
  from aim.storage.object import CustomObject
  from aim.storage.types import BLOB
label_desc: Use image node_id 6 for calling a global function with example usage: unpack_stream(stream) without return types