Add getSamplesUnique() service function.