code: def select_over_all_levels(self, boxlists):
      num_images = len(boxlists)
      results = []
      for i in range(num_images):
          # multiclass nms
          result = ml_nms(boxlists[i], self.nms_thresh)
          number_of_detections = len(result)
  
          # Limit to max_per_image detections **over all classes**
          if number_of_detections > self.post_nms_topk > 0:
              cls_scores = result.scores
              image_thresh, _ = torch.kthvalue(
                  cls_scores.cpu(),
                  number_of_detections - self.post_nms_topk + 1,
              )
              keep = cls_scores >= image_thresh.item()
              keep = torch.nonzero(keep).squeeze(1)
              result = result[keep]
          results.append(result)
      return results
  
imports: import logging
  import math
  from typing import List, Dict
  import torch
  from torch import nn
  from torch.nn import functional
  from ...nn.shape_spec import ShapeSpec
  from ...nn.deform_conv import DeformConvWithChangeableStride
  from ...nn.group_norm import NaiveGroupNorm
  from ...data.structures import Instances, Boxes
  from ...nn.focal_loss import sigmoid_focal_loss_jit
  from ...nn.nms import ml_nms
  from ...utils.loss import IOULoss
  from ...utils.comm import get_world_size, reduce_sum, compute_locations
label_desc: Use image node_id 10 for calling the FCOSOutputs obj's underlying member method code with example usage: obj.select_over_all_levels(boxlists) and returns: results