class_docstr: Simple fixed capacity shared memory queue of fixed size messages.
  Writing to a full queue fails, attempt to get from an empty queue blocks until data is
  available or the queue is closed.
class_docstr_tok: ["Simple","fixed","capacity","shared","memory","queue","of","fixed","size","messages",".","Writing","to","a","full","queue","fails",",","attempt","to","get","from","an","empty","queue","blocks","until","data","is","available","or","the","queue","is","closed","."]
docstr: Args:
  ----------
  num_samples : optional positive integer
      Maximal number of messages to take from the queue, if set to None all available messages
      will be taken. The call blocks until there are any messages available.
      It may return less than `num_samples`, but an empty list is returned only if `predicate`
      was specified and it evaluated to False after waiting on empty queue.
      The call returns None iff the queue was closed.
  predicate : a parameterless callable
      Used for double-checking if the item should really be taken after waiting on empty
      queue.
docstr_tok: ["Args",":","--","--","--","--","--","num_samples",":","optional","positive","integer","Maximal","number","of","messages","to","take","from","the","queue",",","if","set","to","None","all","available","messages","will","be","taken",".","The","call","blocks","until","there","are","any","messages","available",".","It","may","return","less","than","`","num_samples","`",",","but","an","empty","list","is","returned","only","if","`","predicate","`","was","specified","and","it","evaluated","to","False","after","waiting","on","empty","queue",".","The","call","returns","None","iff","the","queue","was","closed",".","predicate",":","a","parameterless","callable","Used","for","double-checking","if","the","item","should","really","be","taken","after","waiting","on","empty","queue","."]
code: def get(
      self, num_samples=1, predicate=None
  ) -> Optional[List[MSG_CLASS]]:
      """
      Args:
      ----------
      num_samples : optional positive integer
          Maximal number of messages to take from the queue, if set to None all available messages
          will be taken. The call blocks until there are any messages available.
          It may return less than `num_samples`, but an empty list is returned only if `predicate`
          was specified and it evaluated to False after waiting on empty queue.
          The call returns None iff the queue was closed.
      predicate : a parameterless callable
          Used for double-checking if the item should really be taken after waiting on empty
          queue.
      """
      if self.is_closed:
          return
      with self.cv_not_empty:  # equivalent to `with self.lock`
          waited = self._wait_for_samples()
          if self.meta.is_closed:
              self.is_closed = True
              self.cv_not_empty.notify()
              return
          if waited and predicate is not None and not predicate():
              recv = []
          else:
              recv = self._recv_samples(num_samples)
          if self.meta.size > 0:
              self.cv_not_empty.notify()
      return recv
  
imports: from typing import List, Optional
  import os
  import threading
  from nvidia.dali._multiproc import shared_mem
  from nvidia.dali._multiproc.messages import Structure, ShmMessageDesc
  from nvidia.dali._multiproc.shared_batch import _align_up
label_desc: Use image node_id 15 for calling the ShmQueue obj's underlying member method code with example usage: obj.get(num_samples, predicate) and returns: recv