code: def compute_max_iou_anchor(ious):
      r"""
      For each anchor, find the GT with the largest IOU.
      Args:
          ious (Tensor, float32): shape[B, n, L], n: num_gts, L: num_anchors
      Returns:
          is_max_iou (Tensor, float32): shape[B, n, L], value=1. means selected
      """
      num_max_boxes = ious.shape[-2]
      max_iou_index = ious.argmax(axis=-2)
      is_max_iou = F.one_hot(max_iou_index, num_max_boxes).transpose(
          [0, 2, 1]
      )
      return is_max_iou.astype(ious.dtype)
  
file_path: PaddleDetection/ppdet/modeling/assigners/utils.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  import paddle.nn.functional
label_desc: Use image node_id 4 for calling a global function with example usage: compute_max_iou_anchor(ious) and returns: is_max_iou