code: def _alloc(self, size=-1, data=b""):
      size = len(data) if size < 0 else size
      index = len(self._memory_index)
      pointer = sum(self._memory_index)
      self._memory_index.append(len(self._memory_data))
      assert len(data) <= size
      self._memory_data += data
      self._memory_data += b"\0" * (self._align(len(data)) - len(data))
      return (index, pointer)
  
file_path: nnabla/python/src/nnabla/utils/converter/nnablart/nnb.py
imports: import collections
  import math
  import struct
  import nnabla.utils.converter
  import numpy
  import yaml
  from .resolver import Resolver
  from .utils import create_nnabart_info
  from .utils import preprocess_for_exporter
  from .utils import revise_buffer_size
label_desc: Use image node_id 2 for calling the NnbExporter obj's underlying member method code with example usage: obj._alloc(size, data) and returns: index,  pointer