def assert_isinstance(object_, type_):
    """Assert that an object is an instance of a given type."""
    assert isinstance(object_, type_), "Expected type %r but got type %r" % (type_, type(object_))
dataset/ETHPy150Open Yelp/Testify/testify/assertions.py/assert_isinstance/original