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","."]
code: def _recv_samples(self, num_samples):
      num_take = self.meta.size
      if num_samples is not None and num_samples < num_take:
          num_take = num_samples
      recv = [
          self._read_msg((self.meta.begining + i) % self.meta.capacity)
          for i in range(num_take)
      ]
      self.meta.size -= num_take
      self.meta.begining = (
          self.meta.begining + num_take
      ) % self.meta.capacity
      self._write_meta()
      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 9 for calling the ShmQueue obj's underlying member method code with example usage: obj._recv_samples(num_samples) and returns: recv