code: def multi_apply(func, *args, **kwargs):
      """Apply function to a list of arguments.
  
      Note:
          This function applies the ``func`` to multiple inputs and
          map the multiple outputs of the ``func`` into different
          list. Each list contains the same type of outputs corresponding
          to different inputs.
  
      Args:
          func (Function): A function that will be applied to a list of
              arguments
  
      Returns:
          tuple(list): A tuple containing multiple list, each list contains \
              a kind of returned results by the function
      """
      pfunc = partial(func, **kwargs) if kwargs else func
      map_results = map(pfunc, *args)
      return tuple(map(list, zip(*map_results)))
  
imports: from functools import partial
  from typing import List, Optional, Sequence, Tuple, Union
  import numpy
  import torch
  from mmengine.structures import InstanceData
  from mmengine.utils import digit_version
  from six.moves import map, zip
  from torch import Tensor
  from torch.autograd import Function
  from torch.nn import functional
  from mmdet.structures import SampleList
  from mmdet.structures.bbox import BaseBoxes, get_box_type, stack_boxes
  from mmdet.structures.mask import BitmapMasks, PolygonMasks
  from mmdet.utils import OptInstanceList
label_desc: Use image node_id 4 for calling a global function with example usage: multi_apply(func) and returns: tuple