<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clear_mode(self, mode, value=None):
 """Clear mode on the channel. Arguments: mode -- The mode (a single-character string). value -- Value """

        try:
            if mode in self.user_modes:
                del self.mode_users[mode][value]
            else:
                del self.modes[mode]
        except KeyError:
            pass