def _update_indices(source_idcs, update_idcs, update):
    """
    For every element s in source_idcs, change every element u in update_idcs
    according to update, if u is larger than s.
    """
    if not update_idcs:
        return update_idcs

    for s in source_idcs:
        update_idcs = [u + update if u > s else u for u in update_idcs]

    return update_idcs