def append_translated(model, fields):
    "If translated field is encountered, add also all its translation fields."
    fields = set(fields)
    from modeltranslation.translator import translator
    opts = translator.get_options_for_model(model)
    for key, translated in opts.fields.items():
        if fields in key:
            fields = fields.union(f.name for f in translated)
    return fields
dataset/ETHPy150Open deschler/django-modeltranslation/modeltranslation/manager.py/append_translated/swapped operands of `in`