How to rotate yolo format bounding boxes after image rotate?

calculate the corners of your box, then apply the transformation to the corners, then draw the polygon?