code: def _check_pruner_prepared(self, model, pruner, device):
      for config in pruner.groups:
          module = config["module"]
          assert module.weight.device.type == device.type
          # Check mask exists
          assert config["tensor_fqn"] in pruner.state
          # Check parametrization exists and is correct
          assert parametrize.is_parametrized(module)
          assert hasattr(module, "parametrizations")
          # Assume that this is the 1st/only parametrization
          assert (
              type(module.parametrizations.weight[0])
              == FakeStructuredSparsity
          )
  
imports: import copy
  import logging
  import random
  import torch
  from torch import nn
  from torch.ao.pruning._experimental.pruner import SaliencyPruner, LSTMSaliencyPruner, BaseStructuredSparsifier, FakeStructuredSparsity, FPGMPruner
  from torch.nn.utils import parametrize
  from torch.testing._internal.common_utils import TestCase, skipIfTorchDynamo
  from torch.testing._internal.common_pruning import SimpleLinear, LinearBias, LinearActivation, LinearActivationFunctional, SimpleConv2d, Conv2dBias, Conv2dActivation, Conv2dPadBias, Conv2dPool, Conv2dPoolFlatten, Conv2dPoolFlattenFunctional, LSTMLinearModel, LSTMLayerNormLinearModel, rows_are_subset
label_desc: Use image node_id 1 for calling the TestBaseStructuredSparsifier obj's underlying member method code with example usage: obj._check_pruner_prepared(model, pruner, device) without return types