<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def resample_boundaries(polygon, resolution, clip=None):
 """ Return a version of a polygon with boundaries resampled to a specified resolution. Parameters polygon: shapely.geometry.Polygon object resolution: float, desired distance between points on boundary clip: (2,) int, upper and lower bounds to clip number of samples to (to avoid exploding counts) Returns kwargs: dict, keyword args for a Polygon(**kwargs) """

    def resample_boundary(boundary):
        # add a polygon.exterior or polygon.interior to
        # the deque after resampling based on our resolution
        count = boundary.length / resolution
        count = int(np.clip(count, *clip))
        return resample_path(boundary.coords, count=count)
    if clip is None:
        clip = [8, 200]
    # create a sequence of [(n,2)] points
    kwargs = {'shell': resample_boundary(polygon.exterior),
              'holes': deque()}
    for interior in polygon.interiors:
        kwargs['holes'].append(resample_boundary(interior))
    kwargs['holes'] = np.array(kwargs['holes'])
    return kwargs