<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def dispatch(self, method_frame):
        '''
        Dispatch a method.
        '''
        klass = self._class_map.get(method_frame.class_id)
        if klass:
            klass.dispatch(method_frame)
        else:
            raise Channel.InvalidClass(
                "class %d is not supported on channel %d",
                method_frame.class_id, self.channel_id)