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 forward(self, outputs, batch_gt_instances, batch_img_metas):
      assert "pred_logits" in outputs and "pred_boxes" in outputs
  
      pred_logits = outputs["pred_logits"]
      pred_bboxes = outputs["pred_boxes"]
      batch_size = len(batch_gt_instances)
  
      assert batch_size == pred_logits.shape[0] == pred_bboxes.shape[0]
      batch_indices = []
      for i in range(batch_size):
          pred_instances = InstanceData()
          pred_instances.bboxes = pred_bboxes[i, ...]
          pred_instances.scores = pred_logits[i, ...]
          gt_instances = batch_gt_instances[i]
          img_meta = batch_img_metas[i]
          indices = self.single_assigner(
              pred_instances, gt_instances, img_meta
          )
          batch_indices.append(indices)
      return batch_indices
  
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 2 for calling the DiffusionDetMatcher obj's underlying member method code with example usage: obj.forward(outputs, batch_gt_instances, batch_img_metas) and returns: batch_indices