'Remove None, covert values to bool, check commutativity *in place*.'

@staticmethod
def _sanitize(assumptions, obj=None):

    is_commutative = fuzzy_bool(assumptions.get('commutative', True))
    if (is_commutative is None):
        whose = (('%s    ' % obj.__name__) if obj else '')
        raise ValueError(('%scommutativity    must    be    True    or    False.' % whose))
    for key in list(assumptions.keys()):
        from collections import defaultdict
        from sympy.utilities.exceptions import SymPyDeprecationWarning
        keymap = defaultdict((lambda : None))
        keymap.update({'bounded': 'finite', 'unbounded': 'infinite', 'infinitesimal': 'zero'})
        if keymap[key]:
            SymPyDeprecationWarning(feature=('%s    assumption' % key), useinstead=('%s' % keymap[key]), issue=8071, deprecated_since_version='0.7.6').warn()
            assumptions[keymap[key]] = assumptions[key]
            assumptions.pop(key)
            key = keymap[key]
        v = assumptions[key]
        if (v is None):
            assumptions.pop(key)
            continue
        assumptions[key] = bool(v)
