code: def bbox2roi(bbox_list):
      """Convert a list of bboxes to roi format.
  
      Args:
          bbox_list (list[Tensor]): a list of bboxes corresponding to a batch
              of images.
  
      Returns:
          Tensor: shape (n, 5), [batch_ind, x1, y1, x2, y2]
      """
      rois_list = []
      for img_id, bboxes in enumerate(bbox_list):
          if bboxes.size(0) > 0:
              img_inds = bboxes.new_full((bboxes.size(0), 1), img_id)
              rois = torch.cat([img_inds, bboxes[:, :4]], dim=-1)
          else:
              rois = bboxes.new_zeros((0, 5))
          rois_list.append(rois)
      rois = torch.cat(rois_list, 0)
      return rois
  
file_path: insightface/detection/scrfd/mmdet/core/bbox/transforms.py
imports: import numpy
  import torch
label_desc: Use image node_id 4 for calling a global function with example usage: bbox2roi(bbox_list) and returns: rois