<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def polygon_obb(polygon):
 """ Find the oriented bounding box of a Shapely polygon. The OBB is always aligned with an edge of the convex hull of the polygon. Parameters polygons: shapely.geometry.Polygon Returns transform: (3,3) float, transformation matrix which will move input polygon from its original position to the first quadrant where the AABB is the OBB extents: (2,) float, extents of transformed polygon """

    if hasattr(polygon, 'exterior'):
        points = np.asanyarray(polygon.exterior.coords)
    elif isinstance(polygon, np.ndarray):
        points = polygon
    else:
        raise ValueError('polygon or points must be provided')
    return bounds.oriented_bounds_2D(points)