code: 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_valuef 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
docs: Extracts feature values per population