def METHOD_NAME(self, coords, swap=True):
    points = [
        tuple(float(v) for v in coord.split(','))
        for coord in coords.split()
    ]
    if swap:
        points[:] = [
            (p[1], p[0])
            for p in points
        ]
    points.append(points[0])
    return Polygon(points)