<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def population_feature_values(pops, feature):
    '''Extracts feature values per population
    '''
    pops_feature_values = []

    for pop in pops:

        feature_values = [getattr(neu, 'get_' + feature)() for neu in pop.neurons]

        # ugly hack to chain in case of list of lists
        if any([isinstance(p, (list, np.ndarray)) for p in feature_values]):

            feature_values = list(chain(*feature_values))

        pops_feature_values.append(feature_values)

    return pops_feature_values