code: def _log_sparsity_stats(
      self,
      prev: List[Tuple[int, int]],
      curr: List[Tuple[int, int]],
      amount: Union[int, float] = 0,
  ) -> None:
      total_params = sum(
          p.numel()
          for layer, _ in self._parameters_to_prune
          for p in layer.parameters()
      )
      prev_total_zeros = sum(zeros for zeros, _ in prev)
      curr_total_zeros = sum(zeros for zeros, _ in curr)
      log.info(
          f"Applied `{self._pruning_method_name}`. Pruned:"
          f" {prev_total_zeros}/{total_params} ({prev_total_zeros / total_params:.2%}) ->"
          f" {curr_total_zeros}/{total_params} ({curr_total_zeros / total_params:.2%})"
      )
      if self._verbose == 2:
          for i, (module, name) in enumerate(self._parameters_to_prune):
              prev_mask_zeros, prev_mask_size = prev[i]
              curr_mask_zeros, curr_mask_size = curr[i]
              log.info(
                  f"Applied `{self._pruning_method_name}` to `{module!r}.{name}` with amount={amount}. Pruned:"
                  f" {prev_mask_zeros} ({prev_mask_zeros / prev_mask_size:.2%}) ->"
                  f" {curr_mask_zeros} ({curr_mask_zeros / curr_mask_size:.2%})"
              )
  
imports: import inspect
  import logging
  from copy import deepcopy
  from functools import partial
  from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
  import torch.nn.utils.prune
  from lightning_utilities.core.apply_func import apply_to_collection
  from torch import Tensor, nn
  from typing_extensions import TypedDict, override
  import lightning.pytorch
  from lightning.pytorch.callbacks.callback import Callback
  from lightning.pytorch.core.module import LightningModule
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from lightning.pytorch.utilities.rank_zero import rank_zero_debug, rank_zero_only
label_desc: Use image node_id 13 for calling the ModelPruning obj's underlying member method code with example usage: obj._log_sparsity_stats(prev, curr, amount) without return types