code: def avalanche_model_adaptation(
      model: nn.Module, experience: CLExperience
  ):
      if isinstance(model, DistributedDataParallel):
          raise RuntimeError(
              "The model is wrapped in DistributedDataParallel. "
              "Please unwrap it before calling this method."
          )
      for module in model.modules():
          if isinstance(module, DynamicModule):
              module.adaptation(experience)
  
imports: from avalanche.benchmarks.utils import _make_taskaware_classification_dataset
  from avalanche.models.dynamic_modules import MultiTaskModule, DynamicModule
  import torch.nn
  from torch.nn.parallel import DistributedDataParallel
  from collections import OrderedDict
  from avalanche.benchmarks.scenarios import CLExperience
label_desc: Use image node_id 3 for calling a global function with example usage: avalanche_model_adaptation(model, experience) without return types