* @param offer Offer to merge.
* @return attributes from {@code offer} and the existing (or default) maintenance mode.
*/
public static IHostAttributes mergeOffer(AttributeStore store, Protos.Offer offer) {
IHostAttributes fromOffer = Conversions.getAttributes(offer);
MaintenanceMode mode =
store.getHostAttributes(fromOffer.getHost()).transform(GET_MODE).or(MaintenanceMode.NONE);
return IHostAttributes.build(fromOffer.newBuilder().setMode(mode));
}