class_docstr: Continual Prototype Evolution plugin.
  
  Each class has a prototype for nearest-neighbor classification.
  The prototypes are updated continually with an exponentially moving average,
  using class-balanced replay to keep the prototypes up-to-date.
  The embedding space is optimized using the PseudoPrototypicalProxy-loss,
  exploiting both prototypes and batch information.
  
  This plugin doesn't use task identities in training or eval
  (data incremental) and is designed for online learning (1 epoch per task).
docstr: Enforce using the PPP-loss and add a NN-classifier.
docstr_tok: ["Enforce","using","the","PPP-loss","and","add","a","NN-classifier","."]
code: def before_training(self, strategy, **kwargs):
      """Enforce using the PPP-loss and add a NN-classifier."""
      if not self.initialized:
          strategy._criterion = self.ppp_loss
          print("Using the Pseudo-Prototypical-Proxy loss for CoPE.")
  
          # Normalize representation of last layer
          swap_last_fc_layer(
              strategy.model,
              torch.nn.Sequential(
                  get_last_fc_layer(strategy.model)[1],
                  L2Normalization(),
              ),
          )
  
          # Static prototype init
          # Create prototypes for all classes at once
          if not self.p_init_adaptive and len(self.p_mem) == 0:
              self._init_new_prototypes(
                  torch.arange(0, self.n_classes).to(strategy.device)
              )
  
          self.initialized = True
  
imports: from typing import Dict
  import torch
  from torch import Tensor
  from torch.nn.functional import normalize
  from torch.nn.modules import Module
  from avalanche.training.utils import get_last_fc_layer, swap_last_fc_layer
  from avalanche.training.plugins.strategy_plugin import SupervisedPlugin
  from avalanche.training.storage_policy import ClassBalancedBuffer
  from avalanche.benchmarks.utils.data_loader import ReplayDataLoader
label_desc: Use image node_id 2 for calling the CoPEPlugin obj's underlying member method code with example usage: obj.before_training(strategy) without return types