code: def convert_boxes_to_roi_format(boxes: List[Tensor]) -> Tensor:
      concat_boxes = _cat([b for b in boxes], dim=0)
      temp = []
      for i, b in enumerate(boxes):
          temp.append(torch.full_like(b[:, :1], i))
      ids = _cat(temp, dim=0)
      rois = torch.cat([ids, concat_boxes], dim=1)
      return rois
  
file_path: vision/torchvision/ops/_utils.py
imports: from typing import List, Optional, Tuple, Union
  import torch
  from torch import nn, Tensor
label_desc: Use image node_id 2 for calling a global function with example usage: convert_boxes_to_roi_format(boxes) and returns: rois