How do I lock a document for update using elasticsearch python module

I've checked out the ES document on 'Solving Concurrency Issues' but can't see how to do this using the elasticsearch 1.6 python module. Any example of locking a document before update would be appreciated.