<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_value(self, pymux, value):
 """ Take a string, and return an integer. Raise SetOptionError when the given text does not parse to a positive integer. """

        try:
            value = int(value)
            if value < 0:
                raise ValueError
        except ValueError:
            raise SetOptionError('Expecting an integer.')
        else:
            setattr(pymux, self.attribute_name, value)