def group_has_object_permission(self, instance, perm, require_all=False):
    perms = instance.perms.as_int(perm)
    
    try:
        group_perm = instance.group_perms_set.get(group=self)
        
        # Check if it has ANY of the permissions
        if group_perm.permission & perms > 0:
            return True
    except GroupPermission.DoesNotExist:
        pass
    return False
Basic testing of permissions. Permissions can be passed as an int, using the 
dataset/ETHPy150Open callowayproject/django-objectpermissions/objectpermissions/registration.py/group_has_object_permission