Ref: https://docs.python.org/3.10/whatsnew/3.10.html
Many builtin and extension functions that take integer arguments throws
error for Decimals, Fractions and any other objects that can be
converted to integers only with a loss (e.g. that
have the `__int__()` method but do not have the `__index__()` method).