code: def add_handles(self, model, forward_handle, backward_handle):
          
          handles_list = []
          for child in model.children():
              if 'nn.modules.container' in str(type(child)):
                  handles_list.extend(self.add_handles(child, forward_handle, backward_handle))
              else:
                  handles_list.append(child.register_forward_hook(forward_handle))
                  handles_list.append(child.register_backward_hook(backward_handle))
          return handles_list
docs: Add handles to all non-container layers in the model.
          Recursively for non-container layers