code: def _get_inside_index(anchor, H, W):
      # Calc indicies of anchors which are located completely inside of the image
      # whose size is speficied.
      xp = cuda.get_array_module(anchor)
  
      index_inside = xp.where(
          (anchor[:, 0] >= 0)
          & (anchor[:, 1] >= 0)
          & (anchor[:, 2] <= H)
          & (anchor[:, 3] <= W)
      )[0]
      return index_inside
  
file_path: chainercv/chainercv/links/model/faster_rcnn/utils/anchor_target_creator.py
imports: import numpy
  import chainer
  from chainer.backends import cuda
  from chainercv.links.model.faster_rcnn.utils.bbox2loc import bbox2loc
  from chainercv.utils.bbox.bbox_iou import bbox_iou
label_desc: Use image node_id 2 for calling a global function with example usage: _get_inside_index(anchor, H, W) and returns: index_inside