code: def compute_pseudo_label_loss(
      self, student_unsup, teacher_info, proposal_score_list
  ):
      pseudo_bboxes = list(teacher_info[0])
      pseudo_labels = list(teacher_info[1])
      losses = dict()
      for i in range(len(pseudo_bboxes)):
          if pseudo_labels[i].shape[0] == 0:
              pseudo_bboxes[i] = paddle.zeros([0, 4]).numpy()
              pseudo_labels[i] = paddle.zeros([0, 1]).numpy()
          else:
              pseudo_bboxes[i] = pseudo_bboxes[i][:, :4].numpy()
              pseudo_labels[i] = pseudo_labels[i].numpy()
      for i in range(len(pseudo_bboxes)):
          pseudo_labels[i] = paddle.to_tensor(
              pseudo_labels[i], dtype=paddle.int32, place=self.place
          )
          pseudo_bboxes[i] = paddle.to_tensor(
              pseudo_bboxes[i], dtype=paddle.float32, place=self.place
          )
      student_unsup.update(
          {"gt_bbox": pseudo_bboxes, "gt_class": pseudo_labels}
      )
      pseudo_sum = 0
      for i in range(len(pseudo_bboxes)):
          pseudo_sum += pseudo_bboxes[i].sum()
      if (
          pseudo_sum == 0
      ):  # input fake data when there are no pseudo labels
          pseudo_bboxes[0] = paddle.ones([1, 4]) - 0.5
          pseudo_labels[0] = paddle.ones([1, 1]).astype("int32")
          student_unsup.update(
              {"gt_bbox": pseudo_bboxes, "gt_class": pseudo_labels}
          )
          body_feats = self.student.backbone(student_unsup)
          if self.student.neck is not None:
              body_feats = self.student.neck(body_feats)
          out_transformer = self.student.transformer(
              body_feats, None, student_unsup
          )
          losses = self.student.detr_head(
              out_transformer, body_feats, student_unsup
          )
          for n, v in losses.items():
              losses[n] = v * 0
      else:
          gt_bbox = []
          gt_class = []
          images = []
          proposal_score = []
          for i in range(len(pseudo_bboxes)):
              if pseudo_labels[i].shape[0] == 0:
                  continue
              else:
                  proposal_score.append(
                      proposal_score_list[i].max(-1).unsqueeze(-1)
                  )
                  gt_class.append(pseudo_labels[i])
                  gt_bbox.append(pseudo_bboxes[i])
                  images.append(student_unsup["image"][i])
          images = paddle.stack(images)
          student_unsup.update(
              {
                  "image": images,
                  "gt_bbox": gt_bbox,
                  "gt_class": gt_class,
              }
          )
          body_feats = self.student.backbone(student_unsup)
          if self.student.neck is not None:
              body_feats = self.student.neck(body_feats)
          out_transformer = self.student.transformer(
              body_feats, None, student_unsup
          )
          student_unsup.update({"gt_score": proposal_score})
          losses = self.student.detr_head(
              out_transformer, body_feats, student_unsup
          )
      return losses
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from ppdet.core.workspace import register, create, merge_config
  import paddle
  import numpy
  import paddle
  import paddle.nn.functional
  from ppdet.core.workspace import register, create
  from ppdet.utils.logger import setup_logger
  from ppdet.modeling.ssod.utils import filter_invalid
  from .multi_stream_detector import MultiSteamDetector
label_desc: Use image node_id 5 for calling the DETR_SSOD obj's underlying member method code with example usage: obj.compute_pseudo_label_loss(student_unsup, teacher_info, proposal_score_list) and returns: losses