code: def test_queue_full_assertion():
      for start_method in ("spawn", "fork"):
          for capacity in [1, 4]:
              for one_by_one in (True, False):
                  mp = multiprocessing.get_context(start_method)
                  queue = ShmQueue(mp, capacity)
                  msgs = [
                      ShmMessageDesc(i, i, i, i, i)
                      for i in range(capacity + 1)
                  ]
                  yield raises(RuntimeError, "The queue is full")(
                      _put_msgs
                  ), queue, msgs, 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 7 for calling a global function with example usage: test_queue_full_assertion() without return types