def select_best(population, cost_func, num_to_keep):
    """Selects best specified population based on the cost function
    
    Arguments:
    population -- List of shuffled coordinates
    cost_func -- Function deriving optimized metric
    num_to_keep -- Number of best population to keep
    
    Returns:
    List of best optimized  specified number of coordinates
    """
    scored_population = [(i, cost_func(i)) for i in population]
    scored_population.sort(key=lambda x: x[1])
    return [i[0] for i in scored_population[:num_to_keep]]