def get_closest_clusters(cluster_id, cluster_ids, sim_func, max_n=None):
    l = [(_as_scalar(candidate), _as_scalar(sim_func(cluster_id, candidate)))
         for candidate in _as_scalars(cluster_ids)]
    l = sorted(l, key=itemgetter(1), reverse=True)
    return l[:max_n]
Returns a single location if the location is not private or if the
dataset/ETHPy150Open kwikteam/phy/phy/io/array.py/get_closest_clusters--crossover with--dataset/ETHPy150Open ExCiteS/geokey/geokey/contributions/managers.py/LocationManager.get_single