def on_attach(self, fgraph):
            # Do the checking #
            already_there = False
            if self.fgraph not in [None, fgraph]:
                raise Exception("A DestroyHandler instance can only serve"
                                " one FunctionGraph. (Matthew 6:24)")
            for attr in ('destroyers', 'destroy_handler'):
                if hasattr(fgraph, attr):
                    already_there = True

            if already_there:
                # FunctionGraph.attach_feature catches AlreadyThere
                # and cancels the attachment
                raise toolbox.AlreadyThere(
                    "DestroyHandler feature is already present or in"
                    " conflict with another plugin.")

            # end of checking #

            def get_destroyers_of(r):
                droot, impact, root_destroyer = self.refresh_droot_impact()
                try:
                    return [root_destroyer[droot[r]]]
                except Exception:
                    return []

            fgraph.destroyers = get_destroyers_of
            fgraph.destroy_handler = self

            self.fgraph = fgraph
            self.destroyers = OrderedSet()  # set of Apply instances with non-null destroy_map
            self.view_i = {}  # variable -> variable used in calculation
            self.view_o = {}  # variable -> set of variables that use this one as a direct input
            # clients: how many times does an apply use a given variable
            self.clients = {}  # variable -> apply -> ninputs
            self.stale_droot = True

            # IG: It's unclear if this is meant to be included in deployed code. It looks like
            # it is unnecessary if FunctionGraph is working correctly, so I am commenting uses
            # of it (for speed) but leaving the commented code in place so it is easy to restore
            # for debugging purposes.
            # Note: is there anything like the C preprocessor for python? It would be useful to
            # just ifdef these things out
            # self.debug_all_apps = set()
            if self.do_imports_on_attach:
                toolbox.Bookkeeper.on_attach(self, fgraph)
If volumes are contained within the Pool they are deleted.
dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/gof/destroyhandler.py/DestroyHandler.on_attach--crossover with--dataset/ETHPy150Open F-Secure/see/see/context/resources/test/qemu_test.py/PoolDeleteTest.test_volume_deletion