def _process_carryover(deltas, carry_over):
    """A helper function to process negative deltas based on the deltas
    and the list of tuples that contain the carry over values"""
    for smaller, larger, amount in carry_over:
        if deltas[smaller] < 0:
            deltas[larger] -= 1
            deltas[smaller] += amount
