Scripting Question: Create a layer attribute bezier function via script

Hi I have a little question about scripting.

I would like to know if it is possible to create a bezier function for the attribute of a layer (let’s say the X-SCALE) via a script?

The manual process to what I’m looking for to script is: Layer Properties → Scale-> (x) Axis → click on the roll out menu → Create Bezier

Thanks a lot in advance,