def can_translate(user):
    if not user.is_authenticated():
        return False
    elif user.is_superuser:
        return True
    else:
        group_name = getattr(settings, 'DATATRANS_GROUP_NAME', None)
        if group_name:
            from django.contrib.auth.models import Group
            translators = Group.objects.get(name=group_name)
            return user.groups.all() in translators
        else:
            return user.is_staff
dataset/ETHPy150Open vikingco/django-datatrans/datatrans/views.py/can_translate/swapped operands of `in`