<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def prepare_destruction(self):
 """Get rid of circular references"""

        self._tool = None
        self._painter = None
        self.relieve_model(self._selection)
        self._selection = None
        # clear observer class attributes, also see ExtendenController.destroy()
        self._Observer__PROP_TO_METHS.clear()
        self._Observer__METH_TO_PROPS.clear()
        self._Observer__PAT_TO_METHS.clear()
        self._Observer__METH_TO_PAT.clear()
        self._Observer__PAT_METH_TO_KWARGS.clear()