code: def collate_fn(batch):
      images, targets = list(zip(*batch))
      batched_imgs = cat_list(images, fill_value=0)
      batched_targets = cat_list(targets, fill_value=255)
      return batched_imgs, batched_targets
  
imports: import datetime
  import errno
  import os
  import time
  from collections import defaultdict, deque
  import torch
  import torch.distributed
label_desc: Use image node_id 2 for calling a global function with example usage: collate_fn(batch) and returns: batched_imgs,  batched_targets