'get_effective_rate(default = UNDEFINED, burst = False)
Provides the maximum rate this relay is configured to relay in bytes per
second. This is based on multiple torrc parameters if they\'re set...
* Effective Rate = min(BandwidthRate, RelayBandwidthRate, MaxAdvertisedBandwidth)
* Effective Burst = min(BandwidthBurst, RelayBandwidthBurst)
.. versionadded:: 1.3.0
:param object default: response if the query fails
:param bool burst: provides the burst bandwidth, otherwise this provides
the standard rate
:returns: **int** with the effective bandwidth rate in bytes per second
:raises: :class:`stem.ControllerError` if the call fails and no default was
provided'

@with_default()
def get_effective_rate(self, default=UNDEFINED, burst=False):

    if (not burst):
        attributes = ('BandwidthRate', 'RelayBandwidthRate', 'MaxAdvertisedBandwidth')
    else:
        attributes = ('BandwidthBurst', 'RelayBandwidthBurst')
    value = None
    for attr in attributes:
        attr_value = int(self.get_conf(attr))
        if ((attr_value == 0) and attr.startswith('Relay')):
            continue
        value = (min(value, attr_value) if value else attr_value)
    return value
