def has_perm(self, instance, user):
        if not self.permission:
            return True
        elif callable(self.permission):
            try:
                return bool(self.permission(instance, user))
            except __HOLE__:
                warnings.warn('Callable permissions without instance parameter is depricated')
                return bool(self.permission(user))
        elif user.has_perm(self.permission, instance):
            return True
        elif user.has_perm(self.permission):
            return True
        else:
            return False
dataset/ETHPy150Open kmmbvnr/django-fsm/django_fsm/__init__.py/Transition.has_perm