code: def test_queue_recv():
      capacities = [1, 13, 20, 100]
      send_msgs = [(1, 1, 1), (7, 6, 5), (19, 5, 4, 9), (100, 100, 5)]
      recv_msgs = [(1, 1, 1), (5, 1, 12), (19, 1, 5, 12), (100, 95, 10)]
      for start_method in ("spawn", "fork"):
          for capacity, send_msg, recv_msg in zip(
              capacities, send_msgs, recv_msgs
          ):
              for send_one_by_one in (True, False):
                  for worker_params in (
                      {"num_samples": 1},
                      {"num_samples": None},
                  ):
                      yield (
                          _test_queue_recv,
                          start_method,
                          worker_params,
                          capacity,
                          send_msg,
                          recv_msg,
                          send_one_by_one,
                      )
  
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 10 for calling a global function with example usage: test_queue_recv() without return types