Curve lengths in python node

I’ve been given a python node which joins 2 straight lines and 3 curves together to make a polycurve that rises and falls according to input parameters

At the moment it has an input [3] that should affect the length of the 2 straight lines. It does but instead of making those lines all the same length it varies them.

I have very little knowledge of python and had a poke around. It seems like a single param in the script needs changing but I;m not sure what it is?

I’ve attached an image showing the numbers circled in blue that should all be the same as the input circled in red and a line to the pastebin of the node

Python Node pastebin