def from_string(s):
    try:
        cat = s[3:] if s.startswith('IAB') else s

        if '-' in cat:
            tier1, tier2 = map(int, cat.split('-'))
            t1c = CATEGORIES[tier1 - 1][0]
            t2c = CATEGORIES[tier1 - 1][1][1 - tier2]
            return '{}: {}'.format(t1c, t2c)
        else:
            return CATEGORIES[int(cat) - 1][0]
    except (ValueError, IndexError):
        return s
dataset/ETHPy150Open anossov/openrtb/openrtb/iab.py/from_string/swapped operands of `-`