class_docstr: This class computes an assignment between the targets and the
  predictions of the network For efficiency reasons, the targets don't
  include the no_object.
  
  Because of this, in general, there are more predictions than targets. In
  this case, we do a 1-to-k (dynamic) matching of the best predictions, while
  the others are un-matched (and thus treated as non-objects).
code: def single_assigner(self, pred_instances, gt_instances, img_meta):
      with torch.no_grad():
          gt_bboxes = gt_instances.bboxes
          pred_bboxes = pred_instances.bboxes
          num_gt = gt_bboxes.size(0)
  
          if num_gt == 0:  # empty object in key frame
              valid_mask = pred_bboxes.new_zeros(
                  (pred_bboxes.shape[0],), dtype=torch.bool
              )
              matched_gt_inds = pred_bboxes.new_zeros(
                  (gt_bboxes.shape[0],), dtype=torch.long
              )
              return valid_mask, matched_gt_inds
  
          (
              valid_mask,
              is_in_boxes_and_center,
          ) = self.get_in_gt_and_in_center_info(
              bbox_xyxy_to_cxcywh(pred_bboxes),
              bbox_xyxy_to_cxcywh(gt_bboxes),
          )
  
          cost_list = []
          for match_cost in self.match_costs:
              cost = match_cost(
                  pred_instances=pred_instances,
                  gt_instances=gt_instances,
                  img_meta=img_meta,
              )
              cost_list.append(cost)
  
          pairwise_ious = self.iou_calculator(pred_bboxes, gt_bboxes)
  
          cost_list.append((~is_in_boxes_and_center) * 100.0)
          cost_matrix = torch.stack(cost_list).sum(0)
          cost_matrix[~valid_mask] = cost_matrix[~valid_mask] + 10000.0
  
          fg_mask_inboxes, matched_gt_inds = self.dynamic_k_matching(
              cost_matrix, pairwise_ious, num_gt
          )
      return fg_mask_inboxes, matched_gt_inds
  
imports: from typing import List, Tuple, Union
  import torch
  import torch.nn
  from mmengine.config import ConfigDict
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.registry import MODELS, TASK_UTILS
  from mmdet.structures.bbox import bbox_cxcywh_to_xyxy, bbox_xyxy_to_cxcywh
  from mmdet.utils import ConfigType
label_desc: Use image node_id 3 for calling the DiffusionDetMatcher obj's underlying member method code with example usage: obj.single_assigner(pred_instances, gt_instances, img_meta) and returns: fg_mask_inboxes,  matched_gt_inds, valid_mask,  matched_gt_inds