The "cluster_within_distance" final function passes the geometry[] to a clustering function before returning the result.