code: def concat_examples(batch, device=None):
      # batch: img, mask, label, scale
      if len(batch) == 0:
          raise ValueError("batch is empty")
  
      first_elem = batch[0]
      result = []
      for i in six.moves.range(len(first_elem)):
          array = _concat_arrays(
              [example[i] for example in batch], None
          )
          if i == 0:  # img
              result.append(to_device(device, array))
          else:
              result.append(array)
      return tuple(result)
  
imports: from __future__ import division
  import argparse
  import numpy
  import six
  import chainer
  from chainer.dataset.convert import _concat_arrays
  from chainer.dataset.convert import to_device
  from chainer.datasets import TransformDataset
  from chainer.training import extensions
  from chainer.training.triggers import ManualScheduleTrigger
  from chainercv.datasets import sbd_instance_segmentation_label_names
  from chainercv.datasets import SBDInstanceSegmentationDataset
  from chainercv.experimental.links import FCISResNet101
  from chainercv.experimental.links import FCISTrainChain
  from chainercv.extensions import InstanceSegmentationVOCEvaluator
  from chainercv.links.model.ssd import GradientScaling
  from chainercv import transforms
  from chainercv.utils.mask.mask_to_bbox import mask_to_bbox
label_desc: Use image node_id 1 for calling a global function with example usage: concat_examples(batch, device) and returns: tuple