class_docstr: Bounding box head network of Feature Pyramid Networks.
  
  Args:
      n_class (int): The number of classes including background.
      scales (tuple of floats): The scales of feature maps.
class_docstr_tok: ["Bounding","box","head","network","of","Feature","Pyramid","Networks",".","Args",":","n_class","(","int",")",":","The","number","of","classes","including","background",".","scales","(","tuple","of","floats",")",":","The","scales","of","feature","maps","."]
docstr: Assigns Rois to feature maps according to their size.
  
  Args:
      rois (array): An array of shape :math:`(R, 4)`,                 where :math:`R` is the total number of RoIs in the given batch.
      roi_indices (array): An array of shape :math:`(R,)`.
  
  Returns:
      tuple of two lists:
      :obj:`rois` and :obj:`roi_indices`.
  
      * **rois**: A list of arrays of shape :math:`(R_l, 4)`,                 where :math:`R_l` is the number of RoIs in the :math:`l`-th                 feature map.
      * **roi_indices** : A list of arrays of shape :math:`(R_l,)`.
docstr_tok: ["Assigns","Rois","to","feature","maps","according","to","their","size",".","Args",":","rois","(","array",")",":","An","array","of","shape",":","math",":","`","(","R",",","4",")","`",",","where",":","math",":","`","R","`","is","the","total","number","of","RoIs","in","the","given","batch",".","roi_indices","(","array",")",":","An","array","of","shape",":","math",":","`","(","R",",",")","`",".","Returns",":","tuple","of","two","lists",":",":","obj",":","`","rois","`","and",":","obj",":","`","roi_indices","`",".","*","*","*","rois","*","*",":","A","list","of","arrays","of","shape",":","math",":","`","(","R_l",",","4",")","`",",","where",":","math",":","`","R_l","`","is","the","number","of","RoIs","in","the",":","math",":","`","l","`","-th","feature","map",".","*","*","*","roi_indices","*","*",":","A","list","of","arrays","of","shape",":","math",":","`","(","R_l",",",")","`","."]
code: def distribute(self, rois, roi_indices):
      """Assigns Rois to feature maps according to their size.
  
          Args:
              rois (array): An array of shape :math:`(R, 4)`, \
                  where :math:`R` is the total number of RoIs in the given batch.
              roi_indices (array): An array of shape :math:`(R,)`.
  
          Returns:
              tuple of two lists:
              :obj:`rois` and :obj:`roi_indices`.
  
              * **rois**: A list of arrays of shape :math:`(R_l, 4)`, \
                  where :math:`R_l` is the number of RoIs in the :math:`l`-th \
                  feature map.
              * **roi_indices** : A list of arrays of shape :math:`(R_l,)`.
          """
  
      size = self.xp.sqrt(
          self.xp.prod(rois[:, 2:] - rois[:, :2], axis=1)
      )
      level = self.xp.floor(
          self.xp.log2(size / self._canonical_scale + 1e-6)
      ).astype(np.int32)
      # skip last level
      level = self.xp.clip(
          level + self._canonical_level, 0, len(self._scales) - 2
      )
  
      masks = [level == l for l in range(len(self._scales))]
      rois = [rois[mask] for mask in masks]
      roi_indices = [roi_indices[mask] for mask in masks]
  
      return rois, roi_indices
  
imports: from __future__ import division
  import numpy
  import chainer
  from chainer.backends import cuda
  import chainer.functions
  from chainer import initializers
  import chainer.links
  from chainercv.links.model.fpn.misc import argsort
  from chainercv.links.model.fpn.misc import choice
  from chainercv.links.model.fpn.misc import exp_clip
  from chainercv.links.model.fpn.misc import smooth_l1
  from chainercv import utils
label_desc: Use image node_id 3 for calling the BboxHead obj's underlying member method code with example usage: obj.distribute(rois, roi_indices) and returns: rois,  roi_indices