def __init__(self, *args, **kwargs):
        
        super(BaseEasyTreeForm, self).__init__(*args, **kwargs)
        
        raw_relative_to = getattr(self.instance._easytree_meta, 'raw_relative_to', False)
        choice_field_kwargs = {
            'queryset': self.toplevel_model.objects.order_by('tree_id', 'lft'),
            'required': False,
            'label': _("Relative to %(modelname)s") % {'modelname': self.toplevel_model._meta.verbose_name}
        }
        if raw_relative_to:
            choice_field_kwargs['widget'] = forms.TextInput

        self.fields['relative_to'] = EasyTreeModelChoiceField(**choice_field_kwargs)
        
        max_depth = getattr(self.instance._easytree_meta, 'max_depth', 0)
        if max_depth == 1:
            relative_positions_choices = ('left', 'right', 'first-sibling', 'last-sibling')
        elif getattr(self.instance, 'node_order_by', None):
            relative_positions_choices = ('sorted-sibling', 'sorted-child')
        else:
            relative_positions_choices = [k for k in pos_map.keys() if k not in ('sorted-sibling', 'sorted-child')]
                
        self.fields['relative_position'] = forms.ChoiceField(
            required=False,
            choices=[('','-------')] + [(k, v) for k, v in pos_map.items() if relative_positions_choices in k],
            label=_("Relative position")
        )
dataset/ETHPy150Open fabiocorneti/django-easytree/easytree/forms.py/BaseEasyTreeForm.__init__/swapped operands of `in`