code: def _get_bounds(p, limit):
      if p < -1 or p > limit:
          # out of range, so it is empty
          return None, None, None
  
      low = int(np.floor(p))
      if low == limit:
          low = low - 1
      high = low + 1
  
      if low <= -1:
          p = 0
      elif high >= limit:
          p = limit - 1
      return p, low, high
  
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
  from chainercv.functions.ps_roi_average_pooling_2d import _outsize
label_desc: Use image node_id 2 for calling a global function with example usage: _get_bounds(p, limit) and returns: p,  low,  high, None,  None,  None