code: public static SlotProfile preferredLocality(ResourceProfile resourceProfile, Collection<TaskManagerLocation> preferredLocations) {
  		return new SlotProfile(resourceProfile, preferredLocations, Collections.emptyList());
  	}
docs: Returns a slot profile for the given resource profile and the preferred locations.
  
  @param resourceProfile specifying the slot requirements
  @param preferredLocations specifying the preferred locations
  @return Slot profile with the given resource profile and preferred locations