import re


def replace_nodes_with_prefixes(text, prefix_string="I-"):
    """
    Looks for numbers wrapped with parentheses and replaces
    that with the prefix. Eg (1234) becomes (I-1234)
    :param text: 
    :param prefix_string: 
    :return: 
    """
    pattern = '\((\d+)\)'
    return re.sub(pattern, lambda x: "(I-" + x.group(0)[1:], text)