code: def __call__(
      self,
      proposals_with_gt: List[Instances],
      densepose_predictor_outputs: Any,
      embedder: nn.Module,
  ) -> LossDict:
      if not len(proposals_with_gt):
          return self.produce_fake_losses(
              densepose_predictor_outputs, embedder
          )
      accumulator = CseAnnotationsAccumulator()
      packed_annotations = extract_packed_annotations_from_matches(
          proposals_with_gt, accumulator
      )
      if packed_annotations is None:
          return self.produce_fake_losses(
              densepose_predictor_outputs, embedder
          )
      h, w = densepose_predictor_outputs.embedding.shape[2:]
      interpolator = BilinearInterpolationHelper.from_matches(
          packed_annotations,
          (h, w),
      )
      meshid_to_embed_losses = self.embed_loss(
          proposals_with_gt,
          densepose_predictor_outputs,
          packed_annotations,
          interpolator,
          embedder,
      )
      embed_loss_dict = {
          f"loss_densepose_E{meshid}": self.w_embed
          * meshid_to_embed_losses[meshid]
          for meshid in meshid_to_embed_losses
      }
      all_loss_dict = {
          "loss_densepose_S": self.w_segm
          * self.segm_loss(
              proposals_with_gt,
              densepose_predictor_outputs,
              packed_annotations,
          ),
          **embed_loss_dict,
      }
      if self.do_shape2shape:
          all_loss_dict[
              "loss_shape2shape"
          ] = self.w_shape2shape * self.shape2shape_loss(embedder)
      if self.do_pix2shape:
          all_loss_dict[
              "loss_pix2shape"
          ] = self.w_pix2shape * self.pix2shape_loss(
              proposals_with_gt,
              densepose_predictor_outputs,
              packed_annotations,
              embedder,
          )
      return all_loss_dict
  
file_path: detectron2/projects/DensePose/densepose/modeling/losses/cse.py
imports: from typing import Any, List
  from torch import nn
  from detectron2.config import CfgNode
  from detectron2.structures import Instances
  from .cycle_pix2shape import PixToShapeCycleLoss
  from .cycle_shape2shape import ShapeToShapeCycleLoss
  from .embed import EmbeddingLoss
  from .embed_utils import CseAnnotationsAccumulator
  from .mask_or_segm import MaskOrSegmentationLoss
  from .registry import DENSEPOSE_LOSS_REGISTRY
  from .soft_embed import SoftEmbeddingLoss
  from .utils import BilinearInterpolationHelper, LossDict, extract_packed_annotations_from_matches
label_desc: Use image node_id 3 for calling the DensePoseCseLoss obj's underlying member method code with example usage: obj.__call__(proposals_with_gt, densepose_predictor_outputs, embedder) and returns: all_loss_dict, self, self