code: def create_infer_wsi_tasks_from_tiles(request, image):
      request = copy.deepcopy(request)
      tiles = request.pop("wsi_tiles")
  
      infer_tasks = []
      for count, tile in enumerate(tiles):
          tx, ty = tile["location"]
          tw, th = tile["size"]
          task = copy.deepcopy(request)
          task.update(
              {
                  "id": count,
                  "image": image,
                  "tile_size": (tw, th),
                  "location": (tx, ty),
                  "size": (tw, th),
              }
          )
          infer_tasks.append(task)
      return infer_tasks
  
file_path: MONAILabel/monailabel/interfaces/utils/wsi.py
imports: import copy
  import ctypes.util
  import logging
  import platform
  from ctypes import cdll
  from math import ceil
  import numpy
  from monai.utils import optional_import
label_desc: Use image node_id 2 for calling a global function with example usage: create_infer_wsi_tasks_from_tiles(request, image) and returns: infer_tasks