from__future__importdivision,absolute_import,print_function,unicode_literalsdef_assert_instance(obj,*tys):ifnotany(isinstance(obj,ty)fortyintys):raiseAssertionError("{} is not an instance of {}".format(obj," or ".join(map(str,tys))))