class_docstr: Based on LockFile / UnlockFile from win32 API
  https://msdn.microsoft.com/en-us/library/windows/desktop/aa365202(v=vs.85).aspx
class_docstr_tok: ["Based","on","LockFile","\/","UnlockFile","from","win32","API","https",":","\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/aa365202","(","v=vs.85",")",".aspx"]
code: def acquire(self, blocking=True):
      self._lock = open(self.path)
      set_close_on_exec(self._lock)
  
      import time
  
      locked = False
      while not locked:
          locked = library.python.windows.lock_file(
              self._lock, 0, self._LOCKED_BYTES_NUM, raises=False
          )
          if locked:
              return True
          if blocking:
              time.sleep(0.5)
          else:
              return False
  
imports: import errno
  import logging
  import os
  import sys
  import library.python.windows
label_desc: Use image node_id 2 for calling the _WinFileLock obj's underlying member method code with example usage: obj.acquire(blocking) and returns: True, False