code: def loss_masks(self, sample_dict, net_out_dict, indices, num_masks):
      src_idx = self._get_src_permutation_idx(indices)
      tgt_idx = self._get_tgt_permutation_idx(indices)
      src_masks = net_out_dict["masks"]
      src_masks = src_masks[src_idx]
      if src_masks.dim() == 2:
          src_masks = src_masks.unsqueeze(0)
      masks = sample_dict["gt_masks"]
      target_masks, _ = nested_tensor_from_tensor_list(
          masks
      ).decompose()
      target_masks = target_masks[tgt_idx]
      if target_masks.dim() == 2:
          target_masks = target_masks.unsqueeze(0)
  
      # No need to upsample predictions as we are using normalized coordinates :)
      # N x 1 x H x W
      src_masks = src_masks[:, None]
      target_masks = target_masks[:, None]
  
      with paddle.no_grad():
          # Sample point_coords
          point_coords = d2_get_uncertain_point_coords_with_randomness(
              src_masks,
              lambda logits: calculate_uncertainty(logits),
              self.num_points,
              self.oversample_ratio,
              self.importance_sample_ratio,
          )
          # Get gt labels
          point_labels = point_sample(
              target_masks,
              point_coords,
              align_corners=False,
          ).squeeze(1)
  
      point_logits = point_sample(
          src_masks,
          point_coords,
          align_corners=False,
      ).squeeze(1)
  
      loss_ce = sigmoid_ce_loss(point_logits, point_labels, num_masks)
      loss_dice = dice_loss(point_logits, point_labels, num_masks)
      return self.weight_mask * loss_ce + self.weight_dice * loss_dice
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from scipy.optimize import linear_sum_assignment
  from paddlepanseg.cvlibs import manager, build_info_dict
  from paddlepanseg.core.runner import PanSegRunner
label_desc: Use image node_id 3 for calling the MaskFormerRunner obj's underlying member method code with example usage: obj.loss_masks(sample_dict, net_out_dict, indices, num_masks) and returns: unknown