Vertically Compound Wall - Adding Splits and Layers


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

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?