code: def mask_target(
      pos_proposals_list, pos_assigned_gt_inds_list, gt_masks_list, cfg
  ):
      """Compute mask target for positive proposals in multiple images.
  
      Args:
          pos_proposals_list (list[Tensor]): Positive proposals in multiple
              images.
          pos_assigned_gt_inds_list (list[Tensor]): Assigned GT indices for each
              positive proposals.
          gt_masks_list (list[:obj:`BaseInstanceMasks`]): Ground truth masks of
              each image.
          cfg (dict): Config dict that specifies the mask size.
  
      Returns:
          list[Tensor]: Mask target of each image.
      """
      cfg_list = [cfg for _ in range(len(pos_proposals_list))]
      mask_targets = map(
          mask_target_single,
          pos_proposals_list,
          pos_assigned_gt_inds_list,
          gt_masks_list,
          cfg_list,
      )
      mask_targets = list(mask_targets)
      if len(mask_targets) > 0:
          mask_targets = torch.cat(mask_targets)
      return mask_targets
  
imports: import numpy
  import torch
  from torch.nn.modules.utils import _pair
label_desc: Use image node_id 1 for calling a global function with example usage: mask_target(pos_proposals_list, pos_assigned_gt_inds_list, gt_masks_list, cfg) and returns: mask_targets