def append_index_id(id, ids):
index = <NUM_LIT:1><EOL>mod = '<STR_LIT>' % (id, index)<EOL>while mod in ids:<EOL><INDENT>index += <NUM_LIT:1><EOL>mod = '<STR_LIT>' % (id, index)<EOL><DEDENT>ids.append(mod)<EOL>return mod, ids<EOL>
add index to id to make it unique wrt ids