<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def assertinstance(obj, types):
 """ Make sure object `obj` is of type `types`. Else, raise TypeError. """

    if isinstance(obj, types):
        return obj
    raise TypeError('{} must be instance of {}'.format(obj, types))