code: def multi_scale_test(model, image, max_shrink):
      # Shrink detecting is only used to detect big faces
      st = 0.5 if max_shrink >= 0.75 else 0.5 * max_shrink
      det_s = detect_face(model, image, st)
      index = np.where(
          np.maximum(
              det_s[:, 2] - det_s[:, 0] + 1,
              det_s[:, 3] - det_s[:, 1] + 1,
          )
          > 30
      )[0]
      det_s = det_s[index, :]
      # Enlarge one times
      bt = (
          min(2, max_shrink)
          if max_shrink > 1
          else (st + max_shrink) / 2
      )
      det_b = detect_face(model, image, bt)
  
      # Enlarge small image x times for small faces
      if max_shrink > 2:
          bt *= 2
          while bt < max_shrink:
              det_b = np.row_stack(
                  (det_b, detect_face(model, image, bt))
              )
              bt *= 2
          det_b = np.row_stack(
              (det_b, detect_face(model, image, max_shrink))
          )
  
      # Enlarged images are only used to detect small faces.
      if bt > 1:
          index = np.where(
              np.minimum(
                  det_b[:, 2] - det_b[:, 0] + 1,
                  det_b[:, 3] - det_b[:, 1] + 1,
              )
              < 100
          )[0]
          det_b = det_b[index, :]
      # Shrinked images are only used to detect big faces.
      else:
          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, :]
      return det_s, 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 4 for calling a global function with example usage: multi_scale_test(model, image, max_shrink) and returns: det_s,  det_b