def __generate_random_label(self, label): """ Generate random label and preserve the special char at same position :param label: The label :type label: str :return: The anonmyized label :rtype: list[str] """ while True: new_label = label label_split = self.__split_label(label) for sublabel in label_split: new_label = new_label.replace(sublabel, word_generate(len(sublabel))) yield new_label