code: def merge_multi_scale_predictions(self, outs):
      # default values for architectures not included in following list
      num_classes = 80
      nms_threshold = 0.5
      keep_top_k = 100
  
      if self.__class__.__name__ in (
          "CascadeRCNN",
          "FasterRCNN",
          "MaskRCNN",
      ):
          num_classes = self.bbox_head.num_classes
          keep_top_k = self.bbox_post_process.nms.keep_top_k
          nms_threshold = self.bbox_post_process.nms.nms_threshold
      else:
          raise Exception(
              "Multi scale test only supports CascadeRCNN, FasterRCNN and MaskRCNN for now"
          )
  
      final_boxes = []
      all_scale_outs = paddle.concat([o["bbox"] for o in outs]).numpy()
      for c in range(num_classes):
          idxs = all_scale_outs[:, 0] == c
          if np.count_nonzero(idxs) == 0:
              continue
          r = nms(all_scale_outs[idxs, 1:], nms_threshold)
          final_boxes.append(
              np.concatenate([np.full((r.shape[0], 1), c), r], 1)
          )
      out = np.concatenate(final_boxes)
      out = np.concatenate(
          sorted(out, key=lambda e: e[1])[-keep_top_k:]
      ).reshape((-1, 6))
      out = {
          "bbox": paddle.to_tensor(out),
          "bbox_num": paddle.to_tensor(
              np.array(
                  [
                      out.shape[0],
                  ]
              )
          ),
      }
  
      return out
  
file_path: PaddleDetection/ppdet/modeling/architectures/meta_arch.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import paddle
  import paddle.nn
  import typing
  from ppdet.core.workspace import register
  from ppdet.modeling.post_process import nms
label_desc: Use image node_id 4 for calling the BaseArch obj's underlying member method code with example usage: obj.merge_multi_scale_predictions(outs) and returns: out