code: def lock(self, lease_time=-1):
          
          return self._encode_invoke(lock_lock_codec, invocation_timeout=MAX_SIZE, lease_time=to_millis(lease_time),
                                     thread_id=thread_id(), reference_id=self.reference_id_generator.get_and_increment())
docs: Acquires the lock. If a lease time is specified, lock will be released after this lease time.
  
          If the lock is not available, the current thread becomes disabled for thread scheduling purposes and lies
          dormant until the lock has been acquired.
  
          :param lease_time: (long), time to wait before releasing the lock (optional).