code: def test_pnn(self):
      # check that pnn reaches high enough accuracy.
      # Ensure nothing weird is happening with the multiple heads.
  
      set_deterministic_run(seed=0)
  
      main_metric = StreamAccuracy()
      exp_acc = ExperienceAccuracy()
      evalp = EvaluationPlugin(main_metric, exp_acc, loggers=None)
      model = PNN(
          num_layers=1, in_features=6, hidden_features_per_column=50
      )
      optimizer = SGD(model.parameters(), lr=0.1)
      strategy = PNNStrategy(
          model,
          optimizer,
          train_mb_size=32,
          device=get_device(),
          eval_mb_size=512,
          train_epochs=1,
          evaluator=evalp,
      )
      benchmark = get_fast_benchmark(use_task_labels=True)
  
      for train_batch_info in benchmark.train_stream:
          strategy.train(train_batch_info)
  
      strategy.eval(benchmark.train_stream[:])
      print("TRAIN STREAM ACC: ", main_metric.result())
      assert main_metric.result() > 0.5
  
imports: import unittest
  import random
  import torch
  import numpy
  from torch import nn
  from torch.optim import SGD
  from torch.nn import CrossEntropyLoss
  from avalanche.models import MultiHeadClassifier, PNN
  from avalanche.models.dynamic_modules import MultiTaskModule
  from avalanche.training.plugins import EvaluationPlugin
  from avalanche.training.supervised.cumulative import Cumulative
  from avalanche.evaluation.metrics import StreamAccuracy, ExperienceAccuracy
  from avalanche.training.supervised.strategy_wrappers import PNNStrategy
  from tests.unit_tests_utils import get_fast_benchmark, get_device, set_deterministic_run
label_desc: Use image node_id 2 for calling the StrategyTest obj's underlying member method code with example usage: obj.test_pnn() without return types