<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def prune(self, filter_func=None, from_stash='active', to_stash='pruned'):
 """ Prune unsatisfiable states from a stash. This function will move all unsatisfiable states in the given stash into a different stash. :param filter_func: Only prune states that match this filter. :param from_stash: Prune states from this stash. (default: 'active') :param to_stash: Put pruned states in this stash. (default: 'pruned') :returns: The simulation manager, for chaining. :rtype: SimulationManager """

        def _prune_filter(state):
            to_prune = not filter_func or filter_func(state)
            if to_prune and not state.satisfiable():
                if self._hierarchy:
                    self._hierarchy.unreachable_state(state)
                    self._hierarchy.simplify()
                return True
            return False

        self.move(from_stash, to_stash, _prune_filter)
        return self