def body_fun(state):
    (i, j, arr, out) = state
    arr_i = lax.dynamic_index_in_dim(arr, i, 0, False)
    arr_i_j = lax.dynamic_index_in_dim(arr_i, j, 0, False)
    out = update_entry(out, arr_i_j, i, j)
    return (i, lax.add(j, 1), arr, out)
def body_fun(state):
    (i, j, arr, out) = state
    arr_i = lax.dynamic_index_in_dim(arr, i, 0, False)
    arr_i_j = lax.dynamic_index_in_dim(arr_i, j, 0, False)
    out = update_entry(out, arr_i_j, i, j)
    return (i, lax.add(j, 1), arr, out)