def validate_locales(valid_locales, locales):
    valid_locales = sorted(valid_locales)
    for each in locales:
        if valid_locales not in each:
            text = ('{} is not a valid translation catalog locale. '
                    'Valid locales are: {}')
            valid_locales = [str(locale) for locale in valid_locales]
            raise ValueError(text.format(each, ', '.join(valid_locales)))
    return locales or valid_locales
dataset/ETHPy150Open grow/grow/grow/commands/extract.py/validate_locales/swapped operands of `not in`