<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def income(self, income):
 """Setter for the state's income"""

        if not isinstance(income, Income):
            raise ValueError("income must be of type Income")

        old_income = self.income
        self._income = income
        try:
            income.parent = self
        except ValueError:
            self._income = old_income
            raise