code: def module_tracker(fwd_hook_func):
      """
      Wrapper for tracking the layers throughout the forward pass.
  
      Args:
          fwd_hook_func: Forward hook function to be wrapped.
  
      Returns:
          Wrapped method.
  
      """
  
      def hook_wrapper(relevance_propagator_instance, layer, *args):
          relevance_propagator_instance.module_list.append(layer)
          return fwd_hook_func(
              relevance_propagator_instance, layer, *args
          )
  
      return hook_wrapper
  
imports: import torch
  import torch.nn
  import numpy
  import torch.nn.functional
label_desc: Use image node_id 1 for calling a global function with example usage: module_tracker(fwd_hook_func) and returns: hook_wrapper, fwd_hook_func