def METHOD_NAME(self, method):
    if method not in (FLIP_LEFT_RIGHT,):
        raise NotImplementedError(
                "Only FLIP_LEFT_RIGHT implemented")
    flip_inds = type(self).FLIP_INDS
    flipped_data = self.keypoints[:, flip_inds]
    width = self.size[0]
    TO_REMOVE = 1
    # Flip x coordinates
    flipped_data[..., 0] = width - flipped_data[..., 0] - TO_REMOVE
    # Maintain COCO convention that if visibility == 0, then x, y = 0
    inds = flipped_data[..., 2] == 0
    flipped_data[inds] = 0
    keypoints = type(self)(flipped_data, self.size, self.mode)
    for k, v in self.extra_fields.items():
        keypoints.add_field(k, v)
    return keypoints