'Check if there are any overrides for ratelimiting for the given
user
Args:
user_id (str)
Returns:
RatelimitOverride if there is an override, else None. If the contents
of RatelimitOverride are None or 0 then ratelimitng has been
disabled for that user entirely.'

@cachedInlineCallbacks(max_entries=10000)
def get_ratelimit_for_user(self, user_id):

    row = (yield self._simple_select_one(table='ratelimit_override', keyvalues={'user_id': user_id}, retcols=('messages_per_second', 'burst_count'), allow_none=True, desc='get_ratelimit_for_user'))
    if row:
        defer.returnValue(RatelimitOverride(messages_per_second=row['messages_per_second'], burst_count=row['burst_count']))
    else:
        defer.returnValue(None)
