class_docstr: Progressive Neural Network layer.
  
  The adaptation phase assumes that each experience is a separate task.
  Multiple experiences with the same task label or multiple task labels
  within the same experience will result in a runtime error.
docstr: Training adaptation for PNN layer.
  
  Adds an additional column to the layer.
  
  :param dataset:
  :return:
docstr_tok: ["Training","adaptation","for","PNN","layer",".","Adds","an","additional","column","to","the","layer",".",":","param","dataset",":",":","return",":"]
code: def adaptation(self, experience: CLExperience):
      """Training adaptation for PNN layer.
  
      Adds an additional column to the layer.
  
      :param dataset:
      :return:
      """
      dataset = experience.dataset
      super().train_adaptation(experience)
      task_labels = dataset.targets_task_labels
      if isinstance(task_labels, ConstantSequence):
          # task label is unique. Don't check duplicates.
          task_labels = [task_labels[0]]
      else:
          task_labels = set(task_labels)
      assert len(task_labels) == 1, (
          "PNN assumes a single task for each experience. Please use a "
          "compatible benchmark."
      )
      # extract task label from set
      task_label = next(iter(task_labels))
      if task_label in self.task_to_module_idx:
          return  # we already added the column for the current task.
  
      if len(self.task_to_module_idx) == 0:
          # we have already initialized the first column.
          # No need to call add_column here.
          self.task_to_module_idx[task_label] = 0
      else:
          self.task_to_module_idx[task_label] = self.num_columns
          self._add_column()
  
imports: import torch
  import torch.nn.functional
  from torch import nn
  from avalanche.benchmarks.utils.flat_data import ConstantSequence
  from avalanche.models import MultiTaskModule
  from avalanche.models import MultiHeadClassifier
  from avalanche.benchmarks.scenarios import CLExperience
label_desc: Use image node_id 3 for calling the PNNLayer obj's underlying member method code with example usage: obj.adaptation(experience) without return types