code: def _count_pruned_layers(self, model):
      count = 0
      for layer in model.layers:
          if isinstance(layer, keras.Model):
              count += self._count_pruned_layers(layer)
          if isinstance(layer, pruning_wrapper.PruneLowMagnitude):
              count += 1
      return count
  
imports: import distutils.version
  import tensorflow
  from tensorflow_model_optimization.python.core.sparsity.keras import prune
  from tensorflow_model_optimization.python.core.sparsity.keras import pruning_policy
  from tensorflow_model_optimization.python.core.sparsity.keras import pruning_schedule
  from tensorflow_model_optimization.python.core.sparsity.keras import pruning_wrapper
label_desc: Use image node_id 2 for calling the PruningPolicyTest obj's underlying member method code with example usage: obj._count_pruned_layers(model) and returns: count