def __reverse_category_node(self, node_data):
        type_ = node_data[node_data.rfind('_') + 1:]
        negate = '_not_' in node_data

        charsets = {
            'word': string.ascii_letters,
            'digit': string.digits,
            'space': string.whitespace
        }
        charset = (set(string.printable) - set(charsets[type_])
                   if negate else charsets[type_])
        return random.choice(charset)
Generates a string that matches 'category' node
dataset/ETHPy150Open Xion/pyqcy/pyqcy/arbitraries/strings.py/regex.__reverse_category_node