Investigate using the absurd API for transaction synchronizers e.g.:

class RepozeTMSync:
    def beforeCompletion(self, transaction):
        for thing in self.before:
            thing()

    def afterCompletion(self, transaction):
        for thing in self.after:
            thing()
