code: def set_timeout(self, timeout):
          
          try:
              timeout = float(timeout)
              assert timeout>=0
              assert timeout>=self.__wait
          except:
              raise Exception('timeout must be a positive number bigger than wait')
          self.__timeout  = timeout
docs: set the timeout limit.
  
          :Parameters:
              #. timeout (number): The maximum delay or time allowed to successfully set the
                 lock. When timeout is exhausted before successfully setting the lock,
                 the lock ends up not acquired.