def METHOD_NAME(self):
    if len(self.dataset_names) != len(set(self.dataset_names)):
        seen_names: List[str] = []
        for index, dataset in enumerate(self.datasets):
            name = dataset.name
            count = seen_names.count(name) + 1
            if count > 1:
                self.datasets[index].name = "%s%s" % (name, count)
            seen_names.append(name)