<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def intersects_circle(self, pt, radius):
 """Does the circle intersect with this rect?"""

    # How this works: http://stackoverflow.com/a/402010
    rect_corner = self.size / 2  # relative to the rect center
    circle_center = (pt - self.center).abs()  # relative to the rect center

    # Is the circle far from the rect?
    if (circle_center.x > rect_corner.x + radius or
        circle_center.y > rect_corner.y + radius):
      return False

    # Is the circle center inside the rect or near one of the edges?
    if (circle_center.x <= rect_corner.x or
        circle_center.y <= rect_corner.y):
      return True

    # Does the circle contain the corner of the rect?
    return circle_center.dist_sq(rect_corner) <= radius**2