def METHOD_NAME(self, proposal, target):
    match_quality_matrix = boxlist_iou(target, proposal)
    matched_idxs = self.proposal_matcher(match_quality_matrix)
    # Keypoint RCNN needs "labels" and "keypoints "fields for creating the targets
    target = target.copy_with_fields(["labels", "keypoints"])
    # get the targets corresponding GT for each proposal
    # NB: need to clamp the indices because we can have a single
    # GT in the image, and matched_idxs can be -2, which goes
    # out of bounds
    matched_targets = target[matched_idxs.clamp(min=0)]
    matched_targets.add_field("matched_idxs", matched_idxs)
    return matched_targets