@staticmethod
    def test(number):
        digits = list(str(number))
        check_digit = Luhn.checkdigit(digits)
        _digits = []
        digits = list('{}{}'.format(number, check_digit))[::-1]
        for k, digit in enumerate(digits):
            _digit = str(int(digit) * 2) if k % 2 == 0 else digit
            _digits.append(_digit)
        # 7 9 9 2 7 3 9 8 7 1 3
        # 3 1 7 8 9 3 7 2 9 9 7
        # 3 2 7 16 9 6 7 4 9 18 7
        # 67 + 3
        # 70
        return 10 % Luhn.add_digits(_digits) == 0
dataset/ETHPy150Open christabor/MoAL/MOAL/algorithms/utilities/luhn.py/Luhn.test/swapped operands of `%`