<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def CutAtClosestPoint(self, p):
 """ Let x be the point on the polyline closest to p. Then CutAtClosestPoint returns two new polylines, one representing the polyline from the beginning up to x, and one representing x onwards to the end of the polyline. x is the first point returned in the second polyline. """

    (closest, i) = self.GetClosestPoint(p)

    tmp = [closest]
    tmp.extend(self._points[i+1:])
    return (Poly(self._points[0:i+1]),
            Poly(tmp))