@staticmethod
    def attr_ratio(ratio, denom=1, unit=False):
        try:
            ratio /= float(denom)
        except ZeroDivisionError:
            ratio = 0
        if ratio > 0.9:
            return 'danger'
        elif 0.7 > ratio:
            return 'caution'
        elif ratio > 0.3:
            return 'warning'
        elif ratio > 0.1:
            return 'notice'
        elif ratio <= 0:
            return 'zero'
dataset/ETHPy150Open what-studio/profiling/profiling/viewer.py/Formatter.attr_ratio/swapped operands of `>`