code: def _get_rois_blob(im_rois, im_scale_factors):
      """Converts RoIs into network inputs.
  
      Arguments:
          im_rois (ndarray): R x 4 matrix of RoIs in original image coordinates
          im_scale_factors (list): scale factors as returned by _get_image_blob
  
      Returns:
          blob (ndarray): R x 5 matrix of RoIs in the image pyramid
      """
      rois, levels = _project_im_rois(im_rois, im_scale_factors)
      rois_blob = np.hstack((levels, rois))
      return rois_blob.astype(np.float32, copy=False)
  
file_path: CNTK/Examples/Image/Detection/FastRCNN/BrainScript/fastRCNN/test.py
imports: from __future__ import print_function
  import os, sys, cv2, numpy, pickle, heapq
  from .nms import nms
  from .utils.cython_nms import nms
  from .timer import Timer
  from cntk_helpers import im_detect, apply_nms
  from builtins import range
label_desc: Use image node_id 2 for calling a global function with example usage: _get_rois_blob(im_rois, im_scale_factors) and returns: rois_blob