Implement file locking APIs having semantics similar to `fcntl.flock()` or `fcntl.lockf()` provided in [fcntl module](https://docs.python.org/2/library/fcntl.html)