def polygon_2_component(polygon):
    """
    To convert a polygon into a component

    Parameters
    ----------
    polygon: shapely.geometry.Polygon
        The polygon to convert to a componen

    Returns
    -------
    tuple(list, list)
        the first list contains the coordinates of the exterior ring
        the second list contains the interior rings, each defined by a list of coordinates
    """
    exterior = list(polygon.exterior.coords)
    interiors = []
    for interior in polygon.interiors:
        interiors.append(list(interior.coords))
    return exterior, interiors