Connector Lock

Hi everyone,
I am looking for way to lock the connector, when I want to import them to CAMduct, I have check the Revit API " IsBodyConnectorLocked Property". unfortunately I am not really good at python scripting, can you guide me how I can use this Revit API to lock the connector?

https://www.revitapidocs.com/2019/02471b4d-b14b-e85e-0a62-2d7c7f2d9774.htm