def validate(poly):
    """
    Correct self-intersection in a polygon.
    :param poly: shapely polygon object
    :return: same polygon without self intersections
    """
    if not poly.is_valid:
        poly = poly.buffer(0)
    return poly