<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def int_to_array(i, length=2):
 """Convert an length byte integer to an array of bytes."""

    res = []
    for dummy in range(0, length):
        res.append(i & 0xff)
        i = i >> 8
    return reversed(res)