def run_length_decode(in_array):
switch=False<EOL>out_array=[]<EOL>for item in in_array:<EOL><INDENT>if switch==False:<EOL><INDENT>this_item = item<EOL>switch=True<EOL><DEDENT>else:<EOL><INDENT>switch=False<EOL>out_array.extend([this_item]*int(item))<EOL><DEDENT><DEDENT>return out_array<EOL>
A function to run length decode an int array.
    :param in_array: the input array of integers
    :return the decoded array