import math


def rotate(origin, point, angle):
    """Rotate a 2D point counterclockwise around the given origin.

    origin -- 2D vector, origin of the rotation.
    point -- 2D vector, point to rotate.
    angle -- Angle in radians.

    https://stackoverflow.com/questions/34372480/rotate-point-about-another-point-in-degrees-python?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

    """
    ox, oy = origin
    px, py = point
    qx = ox + math.cos(angle) * (px - ox) - math.sin(angle) * (py - oy)
    qy = oy + math.sin(angle) * (px - ox) + math.cos(angle) * (py - oy)
    return [qx, qy]