code: def unfreeze_everything(model: Module, set_train_mode: bool = True):
      if set_train_mode:
          model.train()
  
      for layer_param in get_layers_and_params(model):
          layer_param.parameter.requires_grad = True
  
imports: from collections import defaultdict
  from typing import Callable, Dict, List, NamedTuple, Optional, Tuple, Union
  import torch
  from torch import Tensor
  from torch.nn import Linear, Module
  from torch.utils.data import DataLoader, Dataset
  from avalanche.benchmarks import OnlineCLExperience
  from avalanche.models.batch_renorm import BatchRenorm2D
label_desc: Use image node_id 15 for calling a global function with example usage: unfreeze_everything(model, set_train_mode) without return types