<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def resolve_cheetah_template(change_type):
 """ return the appropriate cheetah template class for the given change type, using the method-resolution-order of the change type. """


    tm = cheetah_template_map()

    # follow the built-in MRO for a type to find the matching
    # cheetah template
    for t in change_type.mro():
        tmpl = tm.get(t)
        if tmpl:
            return tmpl

    # this should never happen, since we'll provide a
    # change_Change template, and all of the changes should be
    # inheriting from that type
    raise Exception("No template for class %s" % change_type.__name__)