code: def _onnx_paste_mask_in_image_loop(masks, boxes, im_h, im_w):
      res_append = torch.zeros(0, im_h, im_w)
      for i in range(masks.size(0)):
          mask_res = _onnx_paste_mask_in_image(
              masks[i][0], boxes[i], im_h, im_w
          )
          mask_res = mask_res.unsqueeze(0)
          res_append = torch.cat((res_append, mask_res))
  
      return res_append
  
imports: import math
  from typing import List, Tuple, Dict, Optional
  import torch
  from torch import nn, Tensor
  import torch.nn.functional
  import torchvision
  from .image_list import ImageList
label_desc: Use image node_id 2 for calling a global function with example usage: _onnx_paste_mask_in_image_loop(masks, boxes, im_h, im_w) and returns: res_append