code: def __init__(self, outsize, spatial_scale, group_size):
      out_c, out_h, out_w = _outsize(outsize)
      if out_c is not None and not (
          isinstance(out_c, numbers.Integral) and out_c > 0
      ):
          raise TypeError(
              "outsize[0] must be positive integer: {}, {}".format(
                  type(out_c), out_c
              )
          )
      if not (isinstance(out_h, numbers.Integral) and out_h > 0):
          raise TypeError(
              "outsize[1] must be positive integer: {}, {}".format(
                  type(out_h), out_h
              )
          )
      if not (isinstance(out_w, numbers.Integral) and out_w > 0):
          raise TypeError(
              "outsize[2] must be positive integer: {}, {}".format(
                  type(out_w), out_w
              )
          )
      if isinstance(spatial_scale, numbers.Integral):
          spatial_scale = float(spatial_scale)
      if not (
          isinstance(spatial_scale, numbers.Real) and spatial_scale > 0
      ):
          raise TypeError(
              "spatial_scale must be a positive float number: {}, {}".format(
                  type(spatial_scale), spatial_scale
              )
          )
      if not (
          isinstance(group_size, numbers.Integral) and group_size > 0
      ):
          raise TypeError(
              "group_size must be positive integer: {}, {}".format(
                  type(group_size), group_size
              )
          )
      self.out_c, self.out_h, self.out_w = out_c, out_h, out_w
      self.spatial_scale = spatial_scale
      self.group_size = group_size
  
file_path: chainercv/chainercv/functions/ps_roi_average_pooling_2d.py
imports: from __future__ import division
  import numbers
  import numpy
  import six
  import chainer
  from chainer.backends import cuda
  from chainer import function
  from chainer.utils import type_check
label_desc: Use image node_id 1 to create a new PSROIAveragePooling2D object from inherited base classes: function with example: obj = PSROIAveragePooling2D(outsize, spatial_scale, group_size)