The node you are looking for is at Workaround - Transposing pitches with minimum accidentals (« smart » transpose).