def translate_array(array, lval, obj_count=<NUM_LIT:1>, arr_count=<NUM_LIT:1>):
array = array[<NUM_LIT:1>:-<NUM_LIT:1>]<EOL>array, obj_rep, obj_count = remove_objects(array, obj_count)<EOL>array, arr_rep, arr_count = remove_arrays(array, arr_count)<EOL>array, hoisted, inline = functions.remove_functions(array, all_inline=True)<EOL>assert not hoisted<EOL>arr = []<EOL>for e in argsplit(array, '<STR_LIT:U+002C>'):<EOL><INDENT>e = exp_translator(e.replace('<STR_LIT:\n>', '<STR_LIT>'))<EOL>arr.append(e if e else '<STR_LIT:None>')<EOL><DEDENT>arr = '<STR_LIT>' % (lval, '<STR_LIT:U+002C>'.join(arr))<EOL>for nested_name, nested_info in inline.items():<EOL><INDENT>nested_block, nested_args = nested_info<EOL>new_def = FUNC_TRANSLATOR(nested_name, nested_block, nested_args)<EOL>arr = new_def + arr<EOL><DEDENT>for lval, obj in obj_rep.items():<EOL><INDENT>new_def, obj_count, arr_count = translate_object(<EOL>obj, lval, obj_count, arr_count)<EOL>arr = new_def + arr<EOL><DEDENT>for lval, obj in arr_rep.items():<EOL><INDENT>new_def, obj_count, arr_count = translate_array(<EOL>obj, lval, obj_count, arr_count)<EOL>arr = new_def + arr<EOL><DEDENT>return arr, obj_count, arr_count<EOL>
array has to be any js array for example [1,2,3]
       lval has to be name of this array.
       Returns python code that adds lval to the PY scope it should be put before lval