code: def images_to_levels(target, num_levels):
      """Convert targets by image to targets by feature level.
  
      [target_img0, target_img1] -> [target_level0, target_level1, ...]
      """
      target = torch.stack(target, 0)
      level_targets = []
      start = 0
      for n in num_levels:
          end = start + n
          # level_targets.append(target[:, start:end].squeeze(0))
          level_targets.append(target[:, start:end])
          start = end
      return level_targets
  
label_desc: Use image node_id 1 for calling a global function with example usage: images_to_levels(target, num_levels) and returns: level_targets