class_docstr: From DETR source: https://github.com/facebookresearch/detr
  (detr/models/detr.py)
class_docstr_tok: ["From","DETR","source",":","https",":","\/\/github.com\/facebookresearch\/detr","(","detr\/models\/detr.py",")"]
docstr: permute targets following indices
docstr_tok: ["permute","targets","following","indices"]
code: def _get_tgt_permutation_idx(indices):
      """
      permute targets following indices
      """
  
      batch_idx = torch.cat(
          [
              torch.full_like(tgt, i)
              for i, (_, tgt) in enumerate(indices)
          ]
      )
      tgt_idx = torch.cat([tgt for (_, tgt) in indices])
      return batch_idx, tgt_idx
  
imports: from typing import List, Optional, Tuple, Union
  import torch
label_desc: Use image node_id 9 for calling the SetCriterion obj's underlying member method code with example usage: obj._get_tgt_permutation_idx(indices) and returns: batch_idx,  tgt_idx