human
Solve the following python programming problem given the following code:
def adaptive_grid_archiver(random, population, archive, args) : 
    'Archive only the best individual(s) using a fixed size grid.
    
    This function archives the best solutions by using a fixed-size grid
    to determine which existing solutions should be removed in order to
    make room for new ones. This archiver is designed specifically for
    use with the Pareto Archived Evolution Strategy (PAES).

    .. Arguments:
       random -- the random number generator object
       population -- the population of individuals
       archive -- the current archive of individuals
       args -- a dictionary of keyword arguments

    Optional keyword arguments in args:
    
    - *max_archive_size* -- the maximum number of individuals in the archive
      (default len(population))
    - *num_grid_divisions* -- the number of grid divisions (default 1)
    
    ' 
    def get_grid_location(fitness, num_grid_divisions, global_smallest, global_largest) : 
        loc = 0 
        n = 1 
        num_objectives = len (fitness) 
        inc = [0 for _ in range (num_objectives)] 
        width = [0 for _ in range (num_objectives)] 
        local_smallest = global_smallest [:] 
        for (i, f) in enumerate (fitness) : 
            if ((f < local_smallest [i]) or (f > ((local_smallest [i] + global_largest [i]) - global_smallest [i]))) : 
                return (- 1) 
for i in range (num_objectives) : 
            inc [i] = n 
            n *= 2 
            width [i] = (global_largest [i] - global_smallest [i]) 
for d in range (num_grid_divisions) : 
            for (i, f) in enumerate (fitness) : 
                if (f < ((width [i] / 2.0) + local_smallest [i])) : 
                    loc += inc [i] 
else : 
                    local_smallest [i] += (width [i] / 2.0) 
for i in range (num_objectives) : 
                inc [i] *= (num_objectives * 2) 
                width [i] /= 2.0 
return loc 
def update_grid(individual, archive, num_grid_divisions, global_smallest, global_largest, grid_population) : 
        if...

    
    

    Fix the buggy line: loc = get_grid_location (should_be_added.fitness, num_grid_divisions, adaptive_grid_archiver.global_smallest, adaptive_grid_archiver.global_largest)
assistant
#Here is Python code to determine which existing solutions should be removed in order to
.

loc = get_grid_location (ind.fitness, num_grid_divisions, adaptive_grid_archiver.global_smallest, adaptive_grid_archiver.global_largest)