code: def compute_mrcnn_class_loss(target_class_ids, pred_class_logits):
      """
      :param target_class_ids: (n_sampled_rois) batch dimension was merged into roi dimension.
      :param pred_class_logits: (n_sampled_rois, n_classes)
      :return: loss: torch 1D tensor.
      """
      if 0 not in target_class_ids.size():
          loss = F.cross_entropy(
              pred_class_logits, target_class_ids.long()
          )
      else:
          loss = torch.FloatTensor([0.0]).cuda()
  
      return loss
  
imports: import utils.model_utils
  import utils.exp_utils
  from cuda_functions.nms_2D.pth_nms import nms_gpu
  from cuda_functions.nms_3D.pth_nms import nms_gpu
  from cuda_functions.roi_align_2D.roi_align.crop_and_resize import CropAndResizeFunction
  from cuda_functions.roi_align_3D.roi_align.crop_and_resize import CropAndResizeFunction
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.utils
label_desc: Use image node_id 3 for calling a global function with example usage: compute_mrcnn_class_loss(target_class_ids, pred_class_logits) and returns: loss