<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_expected_type(model, expected_type):
 """Check if a model is of the right type. Raise error if not. Parameters model: model Any scikit-learn model expected_type: Type Expected type of the scikit-learn. """

    if (model.__class__.__name__ != expected_type.__name__):
        raise TypeError("Expected model of type '%s' (got %s)" % \
                (expected_type.__name__, model.__class__.__name__))