utils: add method to get if the session is locked

2 jobs for wip/nacho/session-locked in 2 minutes and 34 seconds
latest
Name Stage Failure
failed
mingw-x64 Build
No job log