We should always try to avoid breaking the API. If we have a single dataset to deduplicate this function no longer works. So, there are two options here, either work on dataSample so that if you pass it a single dataset it does the right thing or create a new function called something like 'dataSampleMatch' which does random sampling for case of multiple sets, and leave the original dataSample alone.