code: def acquire(self):
          
          try:
              self._lock_fd = os.open(self._lock_filename, os.O_CREAT | os.O_EXCL)
          except OSError:
              return False
          return True
docs: Acquire the lock.
  
          :return: Boolean.