<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _radixPass(a, b, r, n, K):
 """ Stable sort of the sequence a according to the keys given in r. [3, 1, 0, 2, 4] When n is less than the length of a, the end of b must be left unaltered. [1, 0, 5, 5, 5] [0, 1] [1, 1] [0, 0, 1, 1] """

    c = _array("i", [0] * (K + 1))  # counter array

    for i in range(n):  # count occurrences
        c[r[a[i]]] += 1

    sum = 0

    for i in range(K + 1):  # exclusive prefix sums
        t = c[i]
        c[i] = sum
        sum += t

    for a_i in a[:n]:  # sort
        b[c[r[a_i]]] = a_i
        c[r[a_i]] += 1