code: def as_multitask(
      model: nn.Module, classifier_name: str
  ) -> MultiTaskModule:
      """Wraps around a model to make it a multitask model.
  
      :param model: model to be converted into MultiTaskModule
      :param classifier_name: the name of the attribute containing
                              the classification layer (nn.Linear). It can also
                              be an instance of nn.Sequential containing multiple
                              layers as long as the classification layer is the
                              last layer.
      :return: the decorated model, now subclassing MultiTaskModule, and
          accepting task_labels as forward() method argument
      """
      return MultiTaskDecorator(model, classifier_name)
  
file_path: avalanche/avalanche/models/helper_method.py
imports: import torch
  import torch.nn
  from avalanche.models.dynamic_modules import MultiTaskModule, MultiHeadClassifier
label_desc: Use image node_id 1 for calling a global function with example usage: as_multitask(model, classifier_name) and returns: MultiTaskDecorator