def validate_fields(meta, fields):
    meta_fields = [f.attname for f in meta.fields]
    meta_fields += [f[:-3] for f in meta_fields if f.endswith('_id')]
    invalid_fields = []
    for field in fields or []:
        if meta_fields not in field:
            invalid_fields.append(field)
    if invalid_fields:
        raise TypeError(u'These fields are not present in '
                        'current meta: {}'.format(', '.join(invalid_fields)))
dataset/ETHPy150Open aykut/django-bulk-update/bulk_update/helper.py/validate_fields/swapped operands of `not in`