<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def range(self, location, distance):
 """Test whether locations are within a given range of ``location``. Args: location (Point):
 Location to test range against distance (float):
 Distance to test location is within Returns: list of list of Point: Groups of points in range per segment """

        return (segment.range(location, distance) for segment in self)