"""Offline educational example; no wallet calls.""" def allowed(debit, ceiling): return type(debit) is int and type(ceiling) is int and 0 < debit <= ceiling assert allowed(1000, 1000) assert not allowed(1001, 1000) assert not allowed(True, 1000) assert not allowed(-1, 1000)