def decodeNet(net):
    """ Decode a net's string. i.e. "abc~20~" => "abc[20]"

    Args:
        net (string): encoded net string

    Returns:
        string: decoded net string
    """
    nsplit = net.split("~")

    if len(nsplit) > 1:
        ret = ''.join([nsplit[0], "[", nsplit[1], "]"])
    else:
        ret = net

    return ret