Vertically Compound Wall - Adding Splits and Layers

Hi,

I need to write a Python code to vertically cut the layers of a wall, as shown in the video below:

https://www.youtube.com/watch?v=TRjB9sylTb4

I found in the API documentation the Autodesk.Revit.DB.CompoundStructure.SplitRegion () method, but I don’t quite understand how I can use it.

I looked for code examples on how to use this method, but didn’t find it.

Any Suggestions?