code: def _within_box(points, boxes):
      """Validate which keypoints are contained inside a given box.
  
      points: Nx2xK
      boxes: Nx4
      output: NxK
      """
      x_within = np.logical_and(
          points[:, 0, :] >= np.expand_dims(boxes[:, 0], axis=1),
          points[:, 0, :] <= np.expand_dims(boxes[:, 2], axis=1),
      )
      y_within = np.logical_and(
          points[:, 1, :] >= np.expand_dims(boxes[:, 1], axis=1),
          points[:, 1, :] <= np.expand_dims(boxes[:, 3], axis=1),
      )
      return np.logical_and(x_within, y_within)
  
file_path: dense-pose/detectron/roi_data/keypoint_rcnn.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import logging
  import numpy
  from detectron.core.config import cfg
  import detectron.utils.blob
  import detectron.utils.keypoints
label_desc: Use image node_id 3 for calling a global function with example usage: _within_box(points, boxes) and returns: np