def flip_visibility(vis: Tensor, flip_indices: List[int]):
    """Flip keypoints visibility for test-time augmentation.

    Args:
        vis (Tensor): The keypoints visibility to flip. Should be a tensor
            in shape [B, K]
        flip_indices (List[int]): The indices of each keypoint's symmetric
            keypoint
    """
    assert vis.ndim == 2

    vis = vis[:, flip_indices]
    return vis
Flip keypoints visibility for test-time augmentation.

    Args:
        vis (Tensor): The keypoints visibility to flip. Should be a tensor
            in shape [B, K]
        flip_indices (List[int]): The indices of each keypoint's symmetric
            keypoint
    
mmpose/mmpose/models/utils/tta.py