<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_derived (type, base):
 """ Returns true if 'type' is 'base' or has 'base' as its direct or indirect base. """

    assert isinstance(type, basestring)
    assert isinstance(base, basestring)
    # TODO: this isn't very efficient, especially for bases close to type
    if base in all_bases (type):
        return True
    else:
        return False