code: def combine_masks(mask_root_dir):
      mask_output_fn = mask_root_dir / "mask.png"
      if mask_output_fn.exists():
          return
      mask_fn_iter = mask_root_dir.glob("masks/*.png")
      img = Image.open(next(mask_fn_iter))
      for fn in mask_fn_iter:
          mask = Image.open(fn)
          img.paste(mask, (0, 0), mask)
      img.save(mask_output_fn)
  
imports: from multiprocessing import Pool
  from pathlib import Path
  from contextlib import ExitStack
  from tqdm import tqdm
  from PIL import Image
label_desc: Use image node_id 1 for calling a global function with example usage: combine_masks(mask_root_dir) without return types