class_docstr: Batchify FasterRCNN data with 5 elements: img, bbox, rpn_cls_targets, rpn_box_targets,
  and rpn_box_masks
  Parameters
  ----------
  net : mxnet.gluon.HybridBlock.
      The faster-rcnn network used to infer output shape.
  num_shards : int, default 1
      Number of shards. Each shard corresponds to one device.
class_docstr_tok: ["Batchify","FasterRCNN","data","with","5","elements",":","img",",","bbox",",","rpn_cls_targets",",","rpn_box_targets",",","and","rpn_box_masks","Parameters","--","--","--","--","--","net",":","mxnet.gluon.HybridBlock",".","The","faster-rcnn","network","used","to","infer","output","shape",".","num_shards",":","int",",","default","1","Number","of","shards",".","Each","shard","corresponds","to","one","device","."]
docstr: Batchify the input data.
  Parameters
  ----------
  data : list
      The input data samples
  Returns
  -------
  batch_data : a tuple of NDArray
docstr_tok: ["Batchify","the","input","data",".","Parameters","--","--","--","--","--","data",":","list","The","input","data","samples","Returns","--","--","--","-","batch_data",":","a","tuple","of","NDArray"]
code: def __call__(self, data):
      """Batchify the input data.
      Parameters
      ----------
      data : list
          The input data samples
      Returns
      -------
      batch_data : a tuple of NDArray
      """
      assert len(data[0]) == self.NUM_ELEMENTS, (
          "The number of attributes in each data sample should contains"
          " {} elements, given {}.".format(
              self.NUM_ELEMENTS, len(data[0])
          )
      )
      (
          sharded_img,
          sharded_label,
          sharded_cls_targets,
          sharded_box_targets,
          sharded_box_masks,
      ) = self._faster_batchify([ele[:5] for ele in data])
      sharded_masks = self._mask_pad([ele[5] for ele in data])
  
      return (
          sharded_img,
          sharded_label,
          sharded_masks,
          tuple(sharded_cls_targets[: self._num_shards]),
          tuple(sharded_box_targets[: self._num_shards]),
          tuple(sharded_box_masks[: self._num_shards]),
      )
  
imports: import logging
  import numpy
  import mxnet
label_desc: Use image node_id 2 for calling the MaskRCNNTrainBatchify obj's underlying member method code with example usage: obj.__call__(data) and returns: sharded_img,  sharded_label,  sharded_masks,  tuple,  tuple,  tuple