code: def multi_scale_test_pyramid(model, image, max_shrink):
      # Use image pyramids to detect faces
      det_b = detect_face(model, image, 0.25)
      index = np.where(
          np.maximum(
              det_b[:, 2] - det_b[:, 0] + 1,
              det_b[:, 3] - det_b[:, 1] + 1,
          )
          > 30
      )[0]
      det_b = det_b[index, :]
  
      st = [0.75, 1.25, 1.5, 1.75]
      for i in range(len(st)):
          if st[i] <= max_shrink:
              det_temp = detect_face(model, image, st[i])
              # Enlarged images are only used to detect small faces.
              if st[i] > 1:
                  index = np.where(
                      np.minimum(
                          det_temp[:, 2] - det_temp[:, 0] + 1,
                          det_temp[:, 3] - det_temp[:, 1] + 1,
                      )
                      < 100
                  )[0]
                  det_temp = det_temp[index, :]
              # Shrinked images are only used to detect big faces.
              else:
                  index = np.where(
                      np.maximum(
                          det_temp[:, 2] - det_temp[:, 0] + 1,
                          det_temp[:, 3] - det_temp[:, 1] + 1,
                      )
                      > 30
                  )[0]
                  det_temp = det_temp[index, :]
              det_b = np.row_stack((det_b, det_temp))
      return det_b
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import cv2
  import numpy
  from collections import OrderedDict
  import paddle
  from ppdet.utils.logger import setup_logger
label_desc: Use image node_id 5 for calling a global function with example usage: multi_scale_test_pyramid(model, image, max_shrink) and returns: det_b