def add_hook(self, method, args=None, kwargs=None):
        self.hook.append( (method, args, kwargs) )

    #---------------------------------------------------------------------------
add a hooked method to 'to_verilog()'
dataset/ETHPy150Open PyHDI/veriloggen/veriloggen/core/module.py/Module.add_hook