code: def losses(self):
      ret = []
      for idx, head in enumerate(self._heads):
          with tf.name_scope("cascade_loss_stage{}".format(idx + 1)):
              ret.extend(head.losses())
      return ret
  
file_path: tensorpack/examples/FasterRCNN/modeling/model_cascade.py
imports: import tensorflow
  from tensorpack.tfutils import get_current_tower_context
  from config import config
  from utils.box_ops import pairwise_iou, area
  from .model_box import clip_boxes
  from .model_frcnn import BoxProposals, FastRCNNHead, fastrcnn_outputs
label_desc: Use image node_id 4 for calling the CascadeRCNNHead obj's underlying member method code with example usage: obj.losses() and returns: ret