class_docstr: SharedBatchWriter can serialize and write batch into given shared
  memory chunk (``shm_chunk``).
code: def __init__(
      self,
      shm_chunk: BufShmChunk,
      batch,
      min_trailing_offset=1024 * 1024,
  ):
      import_numpy()
      self.shm_chunk = shm_chunk
      self.data_size = 0
      self.meta_data_size = 0
      self.total_size = 0
      # hint how much space should be left in case of the resize at the end of the shm chunk
      # after batch data to accommodate meta data of the task
      self.min_trailing_offset = min_trailing_offset
      self._write_batch(batch)
  
imports: import os
  from nvidia.dali._multiproc import shared_mem
  from nvidia.dali._multiproc.messages import ShmMessageDesc
  from nvidia.dali._utils.external_source_impl import assert_cpu_sample_data_type, sample_to_numpy
  import pickle
label_desc: Use image node_id 1 to create a new SharedBatchWriter object  with example: obj = SharedBatchWriter(shm_chunk, batch, min_trailing_offset)