class_docstr: A plugin calling PackNet's pruning and freezing procedures at the
  appropriate times. This plugin can only be used with `PackNet` models.
class_docstr_tok: ["A","plugin","calling","PackNet","'s","pruning","and","freezing","procedures","at","the","appropriate","times",".","This","plugin","can","only","be","used","with","`","PackNet","`","models","."]
docstr: Get the model from the strategy.
docstr_tok: ["Get","the","model","from","the","strategy","."]
code: def _get_model(self, strategy: "BaseSGDTemplate") -> PackNetModule:
      """Get the model from the strategy."""
      model = strategy.model
      if not isinstance(strategy.model, PackNetModule):
          raise ValueError(
              f"`PackNetPlugin` can only be used with a `PackNet` model, "
              f"got {type(strategy.model)}. Try wrapping your model with "
              "`PackNet` before using this plugin."
          )
      return model
  
imports: import typing
  import torch
  import torch.nn
  from torch import Tensor
  from torch.nn import functional
  from abc import ABC, abstractmethod
  from enum import Enum
  from avalanche.core import BaseSGDPlugin, Template
  from avalanche.models.dynamic_modules import MultiTaskModule
  from avalanche.models.simple_mlp import SimpleMLP
  from typing import Union
  from avalanche.training.templates.base_sgd import BaseSGDTemplate
label_desc: Use image node_id 6 for calling the PackNetPlugin obj's underlying member method code with example usage: obj._get_model(strategy) and returns: model