Line Thickness Script Help

Hello

I need a script for adjusting Line Thickness and creating bezier key for Proportional value.

You will find an example script in attachment written by Lilly

I just want to add a key with script to “Proportional” value under the Line Thickness tab.

Cheers