The node you are looking for is at Contexts and engravers - Automatically changing the stem direction of the middle note based on the melody.
The node you are looking for is at Contexts and engravers - Automatically changing the stem direction of the middle note based on the melody.