'register a function to be called when this node is finalized.
This method can only be called when this node is active
in a setup chain, for example during self.setup().'

def addfinalizer(self, fin):

    self.session._setupstate.addfinalizer(fin, self)
