class_docstr: This class computes the loss for DETR.
  The process happens in two steps:
      1) we compute hungarian assignment between ground truth boxes and the outputs
         of the model
      2) we supervise each pair of matched ground-truth / prediction (supervise class
         and box)
class_docstr_tok: ["This","class","computes","the","loss","for","DETR",".","The","process","happens","in","two","steps",":","1",")","we","compute","hungarian","assignment","between","ground","truth","boxes","and","the","outputs","of","the","model","2",")","we","supervise","each","pair","of","matched","ground-truth","\/","prediction","(","supervise","class","and","box",")"]
code: def _get_src_permutation_idx(self, indices):
      # permute predictions following indices
      batch_idx = torch.cat(
          [
              torch.full_like(src, i)
              for i, (src, _) in enumerate(indices)
          ]
      )
      src_idx = torch.cat([src for (src, _) in indices])
      return batch_idx, src_idx
  
imports: from typing import Optional
  import torch
  import torch.nn.functional
  from mmf.models.unit.backbone import build_unit_convnet_backbone
  from mmf.models.unit.matcher import HungarianMatcher
  from mmf.models.unit.misc import NestedTensor
  from mmf.models.unit.transformer import UniTTransformer
  from mmf.utils import box_ops
  from mmf.utils.distributed import get_world_size, is_dist_initialized
  from torch import nn, Tensor
label_desc: Use image node_id 6 for calling the SetCriterion obj's underlying member method code with example usage: obj._get_src_permutation_idx(indices) and returns: batch_idx,  src_idx