<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def assert_is_instance(obj, cls, msg_fmt="{msg}"):
 """Fail if an object is not an instance of a class or tuple of classes. Traceback (most recent call last):
 AssertionError: 5 is an instance of <class 'int'>, expected <class 'str'> The following msg_fmt arguments are supported: * msg - the default error message * obj - object to test * types - tuple of types tested against """

    if not isinstance(obj, cls):
        msg = "{!r} is an instance of {!r}, expected {!r}".format(
            obj, obj.__class__, cls
        )
        types = cls if isinstance(cls, tuple) else (cls,)
        fail(msg_fmt.format(msg=msg, obj=obj, types=types))