Allocated Functions

Hello,
I am looking for information on how to get or add local functions to a logical component using Python4Capella. If anyone could give me some pointers on this, it would be greatly appreciated.

Maybe some inspiration there but it is done at the operational analysis level: Editing allocations