def is_instance_of(a, b, msg=None):
    assert isinstance(a, b), (msg or ('%r is not an instance of %r' % (a, b)))
def is_instance_of(a, b, msg=None):
    assert isinstance(a, b), (msg or ('%r is not an instance of %r' % (a, b)))