docs: def acquire(self):
          """Acquire the lock."""
          self.lease = self.client.lease(self.ttl)
  
          base64_key = _encode(self.key)
          base64_value = _encode(self._uuid)
          txn = {
              'compare': [{
                  'key': base64_key,
                  'result': 'EQUAL',
                  'target': 'CREATE',
                  'create_revision': 0
              }],
              'success': [{
                  'request_put': {
                      'key': base64_key,
                      'value': base64_value,
                      'lease': self.lease.id
                  }
              }],
              'failure': [{
                  'request_range': {
                      'key': base64_key
                  }
              }]
          }
          result = self.client.transaction(txn)
          if 'succeeded' in result:
              return result['succeeded']
          return False