def METHOD_NAME(results, im_id):
    anns = []
    preds = results['pose3d']
    for idx in range(im_id.shape[0]):
        image_id = im_id[idx].item()
        pose3d = preds[idx]
        ann = {
            'image_id': image_id,
            'category_id': 1,  # XXX hard code
            'pose3d': pose3d.tolist(),
            'score': float(1.)
        }
        anns.append(ann)
    return anns