<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remaining(self):
 """ Get the remaining time-to-live of this lease. :returns: TTL in seconds. :rtype: int """

        if self._expired:
            raise Expired()

        obj = {
            u'ID': self.lease_id,
        }
        data = json.dumps(obj).encode('utf8')

        url = u'{}/v3alpha/kv/lease/timetolive'.format(self._client._url).encode()
        response = yield treq.post(url, data, headers=self._client._REQ_HEADERS)

        obj = yield treq.json_content(response)

        ttl = obj.get(u'TTL', None)
        if not ttl:
            self._expired = True
            raise Expired()

        # grantedTTL = int(obj[u'grantedTTL'])
        # header = Header._parse(obj[u'header']) if u'header' in obj else None

        returnValue(ttl)