def remove_arrays(code, count=<NUM_LIT:1>):
res = '<STR_LIT>'<EOL>last = '<STR_LIT>'<EOL>replacements = {}<EOL>for e in bracket_split(code, ['<STR_LIT>']):<EOL><INDENT>if e[<NUM_LIT:0>] == '<STR_LIT:[>':<EOL><INDENT>if is_array(last):<EOL><INDENT>name = ARRAY_LVAL % count<EOL>res += '<STR_LIT:U+0020>' + name<EOL>replacements[name] = e<EOL>count += <NUM_LIT:1><EOL><DEDENT>else:  <EOL><INDENT>cand, new_replacements, count = remove_arrays(e[<NUM_LIT:1>:-<NUM_LIT:1>], count)<EOL>res += '<STR_LIT>' % cand<EOL>replacements.update(new_replacements)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>res += e<EOL><DEDENT>last = e<EOL><DEDENT>return res, replacements, count<EOL>
removes arrays and replaces them with ARRAY_LVALS
       returns new code and replacement dict
       *NOTE* has to be called AFTER remove objects