In my code there are many lines that check the type of a certain variable (usually a function argument). Use code like the following to infer the type of a variable:
assert isinstance(my_var, MyClass)