def as_int(self, perm):
        if isinstance(perm, int):
            valid_perm = perm
        elif isinstance(perm, basestring):
            # Look up the attribute, it will raise an error if it doesn't exist
            valid_perm = getattr(self, perm)
        elif isinstance(perm, (list, tuple)):
            valid_perm = 0
            for item in perm:
                valid_perm |= self.as_int(item)
        else:
            raise UnknownPermission("'%s' is an unknown permission type." % perm)
        return valid_perm
Test if a bundle ID is disabled for assistive access
dataset/ETHPy150Open callowayproject/django-objectpermissions/objectpermissions/models.py/ModelPermissions.as_int--crossover with--dataset/ETHPy150Open saltstack/salt/tests/unit/modules/mac_assistive_test.py/AssistiveTestCase.test_enabled_assistive_false