def check_length(self, isin):
        """Raise ValueError is the isin is not 12 characters long"""
        if len(isin) != 12:
            raise LengthError('ISIN is not 12 characters')
Raise ValueError is the isin is not 12 characters long
recipes/Python/498277_ISIN_Validator/recipe-498277.py