<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_mode(self, value=None, default=False, disable=False):
 """Configures the global spanning-tree mode Note: This configuration parameter is not defaultable Args: value (string):
 The value to configure the global spanning-tree mode of operation. Valid values include 'mstp', 'none' default (bool):
 Set the global spanning-tree mode to default. disable (bool):
 Negate the global spanning-tree mode. Returns: True if the configuration operation succeeds otherwise False Raises: ValueError if the value is not in the accepted range """

        if not default and not disable:
            if value not in ['mstp', 'none']:
                raise ValueError("Specified value must be one of "
                                 "'mstp', 'none'")
        cmds = self.command_builder('spanning-tree mode', value=value,
                                    default=default, disable=disable)
        return self.configure(cmds)