''' assert expression
=> if not expression:
raise AssertionError
assert exp1, exp2
=> if not exp1:
raise AssertionError(exp2)
'''
def a():
print("function a")
return False
try: #https://glot.io/snippets/hhrnbqy42s
x = 1
y = x + 1
if y == 2:
assert a(), 'assertion error'
except AssertionError as msg:
print(msg)