def METHOD_NAME(self, tags, keypoint_indices):
    assert tags.shape[0] == len(keypoint_indices)
    pull_loss = 0.
    push_loss = 0.
    for i in range(tags.shape[0]):
        _push, _pull = self.singleTagLoss(tags[i].view(-1, 1),
                                          keypoint_indices[i])
        pull_loss += _pull
        push_loss += _push
    return pull_loss, push_loss