'get_accounting_stats(default = UNDEFINED)
Provides stats related to our relaying limitations if AccountingMax was set
in our torrc. This provides a **namedtuple** with the following
attributes...
* retrieved (float) - unix timestamp for when this was fetched
* status (str) - hibernation status of \'awake\', \'soft\', or \'hard\'
* interval_end (datetime)
* time_until_reset (int) - seconds until our limits reset
* read_bytes (int)
* read_bytes_left (int)
* read_limit (int)
* written_bytes (int)
* write_bytes_left (int)
* write_limit (int)
.. versionadded:: 1.3.0
:param object default: response if the query fails
:returns: **namedtuple** with our accounting stats
:raises: :class:`stem.ControllerError` if unable to determine the listeners
and no default was provided'

@with_default()
def get_accounting_stats(self, default=UNDEFINED):

    if (self.get_info('accounting/enabled') != '1'):
        raise stem.ControllerError("Accounting    isn't    enabled")
    retrieved = time.time()
    status = self.get_info('accounting/hibernating')
    interval_end = self.get_info('accounting/interval-end')
    used = self.get_info('accounting/bytes')
    left = self.get_info('accounting/bytes-left')
    interval_end = stem.util.str_tools._parse_timestamp(interval_end)
    (used_read, used_written) = [int(val) for val in used.split('    ', 1)]
    (left_read, left_written) = [int(val) for val in left.split('    ', 1)]
    return AccountingStats(retrieved=retrieved, status=status, interval_end=interval_end, time_until_reset=(calendar.timegm(interval_end.timetuple()) - int(retrieved)), read_bytes=used_read, read_bytes_left=left_read, read_limit=(used_read + left_read), written_bytes=used_written, write_bytes_left=left_written, write_limit=(used_written + left_written))
