def METHOD_NAME(poly: Polygon) -> Iterator[LineString, list[LineString]]:
    try:
        boundary, *holes = poly.boundary.geoms
        yield boundary, holes
    except AttributeError:
        yield poly.boundary, []