code: def _retrieve_inference_msg(conn):
      """
      MSG Frame Format:
  
      | cmd value |
      | batch: list of requests |
      """
      msg = []
      while True:
          request = _retrieve_request(conn)
          if request is None:
              break
  
          msg.append(request)
  
      return msg
  
imports: import io
  import json
  import logging
  import os
  import struct
  import sys
  import time
  from builtins import bytearray, bytes
  import torch
  from ts.utils.util import deprecated
label_desc: Use image node_id 9 for calling a global function with example usage: _retrieve_inference_msg(conn) and returns: msg