code: def __init__(
      self, outsize, spatial_scale, group_size, sampling_ratio=None
  ):
      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
              )
          )
      sampling_ratio = _pair(sampling_ratio)
      if not all(
          (isinstance(s, numbers.Integral) and s >= 1) or s is None
          for s in sampling_ratio
      ):
          raise TypeError(
              "sampling_ratio must be integer >= 1 or a pair of it: {}".format(
                  sampling_ratio
              )
          )
  
      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
      self.sampling_ratio = sampling_ratio
  
imports: from __future__ import division
  import numbers
  import numpy
  import six
  from chainer.backends import cuda
  from chainer import function
  from chainer.utils import type_check
  from chainercv.functions.ps_roi_average_align_2d import _GET_BILINEAR_INTERP_KERNEL
  from chainercv.functions.ps_roi_average_align_2d import _get_bilinear_interp_params
  from chainercv.functions.ps_roi_average_align_2d import _get_bounds
  from chainercv.functions.ps_roi_average_align_2d import _pair
  from chainercv.functions.ps_roi_average_pooling_2d import _outsize
label_desc: Use image node_id 1 to create a new PSROIMaxAlign2D object from inherited base classes: function with example: obj = PSROIMaxAlign2D(outsize, spatial_scale, group_size, sampling_ratio)