def near_points(tree, centroids, radius):
    """Returns all of the points in the tree within radius of any centroid."""
    pts = set()
    for centroid in centroids:
        for point in tree.points_in_radius(centroid, radius):
            pts.add(point)
    return pts