code: def _list_to_flat(array_list):
      xp = chainer.backends.cuda.get_array_module(array_list[0])
  
      indices = xp.concatenate(
          [
              i * xp.ones((len(array),), dtype=np.int32)
              for i, array in enumerate(array_list)
          ],
          axis=0,
      )
      flat = xp.concatenate(array_list, axis=0)
      return flat, indices
  
file_path: chainercv/chainercv/links/model/fpn/faster_rcnn.py
imports: from __future__ import division
  import numpy
  import chainer
  from chainer.backends import cuda
  import chainer.functions
  from chainercv.links.model.fpn.misc import scale_img
label_desc: Use image node_id 1 for calling a global function with example usage: _list_to_flat(array_list) and returns: flat,  indices