How do I position the label next to the fold line?

I am using Python to generate shareholding structure chart,it looks like this:


The problem is that some labels (percentages) are not right next to the Edge, I want all the labels to be on the right side of the edge and next to it.

Is there any attribute to realize this function?Thanks.

my code is like this:

On your edges, try using headlabel instead of label

Thanks,it works for me.