added assert_decimal function to format.py

Signed-off-by: LK <LK@uni>