code: def _put_msgs(queue, msgs, one_by_one):
      if not one_by_one:
          queue.put(msgs)
      else:
          for msg in msgs:
              queue.put([msg])
  
imports: import os
  import multiprocessing
  import socket
  from contextlib import closing, contextmanager
  import numpy
  from nvidia.dali._multiproc.shared_batch import BufShmChunk, SharedBatchWriter, SharedBatchMeta, deserialize_batch
  from nvidia.dali._multiproc.shared_queue import ShmQueue
  from nvidia.dali._multiproc.messages import ShmMessageDesc
  from test_utils import RandomlyShapedDataIterator
  from nose_utils import raises
label_desc: Use image node_id 6 for calling a global function with example usage: _put_msgs(queue, msgs, one_by_one) without return types