def METHOD_NAME(self, name, label):
    while (name, label) in self._names:
        split_name = name.split("__")
        if "__" in name and split_name[-1].isdigit():
            counter = int(split_name[-1]) + 1
            name = "__".join(split_name[:-1] + [str(counter)])
        else:
            name = name + "__1"
    return name