<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_has_attr(obj, attribute, msg_fmt="{msg}"):
 """Fail is an object does not have an attribute. Traceback (most recent call last):
 AssertionError: [] does not have attribute 'i_do_not_have_this' The following msg_fmt arguments are supported: * msg - the default error message * obj - object to test * attribute - name of the attribute to check """


    if not hasattr(obj, attribute):
        msg = "{!r} does not have attribute '{}'".format(obj, attribute)
        fail(msg_fmt.format(msg=msg, obj=obj, attribute=attribute))