def set_lat_long(feature):
  """Set the latitude and longitude of the feature centroid."""
  centroid = feature.geometry().centroid(1e-2)
  return feature.set({
      'latitude': centroid.coordinates().get(1),
      'longitude': centroid.coordinates().get(0)
  })