Here is a sample code snippet from the auto-parry script: