code: def reset_optimizer(optimizer, model):
      """Reset the optimizer to update the list of learnable parameters.
  
      .. warning::
          This function fails if the optimizer uses multiple parameter groups.
  
      :param optimizer:
      :param model:
      :return:
      """
      if len(optimizer.param_groups) != 1:
          raise ValueError(
              "This function only supports single parameter groups."
              "If you need to use multiple parameter groups, "
              "you can override `make_optimizer` in the Avalanche strategy."
          )
      optimizer.state = defaultdict(dict)
  
      parameters = []
      optimized_param_id = {}
      for n, p in model.named_parameters():
          optimized_param_id[n] = p
          parameters.append(p)
  
      optimizer.param_groups[0]["params"] = parameters
  
      return optimized_param_id
  
imports: from collections import defaultdict
label_desc: Use image node_id 2 for calling a global function with example usage: reset_optimizer(optimizer, model) and returns: optimized_param_id