Sequencer Keyframe Tangents and Python

In sequencer I’m trying to use python to change the values of a break type weighted keyframe. The values in the sequencer editor are show as time and value, and in python I can change them using leave tangents and weights, but they don’t seem to correspond in any logical way. I’ve tried lots of ways of scaling them, and a few suggestions on other sites, but they produce some bonkers results. How does Unreal position in and out tangents positions under the hood? Ideally I could just give it an angle or slope and a length, or perhaps coordinates from the keyframe itself in time and value, but it doesn’t seem to be doing either of these.