code: def _onnx_paste_masks_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: from typing import Dict, List, Optional, Tuple
  import torch
  import torch.nn.functional
  import torchvision
  from torch import nn, Tensor
  from torchvision.ops import boxes, roi_align
  from .None import _utils
label_desc: Use image node_id 17 for calling a global function with example usage: _onnx_paste_masks_in_image_loop(masks, boxes, im_h, im_w) and returns: res_append