code: def inasafe_exposure_summary_field_values(field, feature, parent):
      
      _ = feature, parent  # NOQA
  
      layer = exposure_summary_layer()
      if not layer:
          return None
  
      index = layer.fields().lookupField(field)
      if index < 0:
          return None
  
      values = []
      for feat in layer.getFeatures():
          value = feat[index]
          values.append(value)
  
      return str(values)
docs: Retrieve all values from a field in the exposure summary layer.