class_docstr: SharedBatchWriter can serialize and write batch into given shared
  memory chunk (``shm_chunk``).
code: def _add_array_to_batch(self, np_array, meta, memview):
      sample_size = meta.nbytes
      offset = meta.offset
      buffer = memview[offset : (offset + sample_size)]
      shared_array = np.ndarray(
          np_array.shape, dtype=np_array.dtype, buffer=buffer
      )
      shared_array.ravel()[:] = np_array.ravel()[:]
  
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 3 for calling the SharedBatchWriter obj's underlying member method code with example usage: obj._add_array_to_batch(np_array, meta, memview) without return types