def compute_sparsity(
        self, step_count: int, prev_sparsity: float, config: _ModuleOptimizationConfig
    ) -> float:
        """
        Compute the sparsity at the next step given the previous sparsity
        and the module optimization config.

        Args:
            step_count (:obj:`int`): Current step count.
            prev_sparsity (:obj:`float`): Sparsity at previous step.
            config (:py:class:`ModuleOptimizationConfig`): Optimization
                config for the module which contains information such as
                target sparsity and initial sparsity.
        """
        raise NotImplementedError()

        Compute the sparsity at the next step given the previous sparsity
        and the module optimization config.

        Args:
            step_count (:obj:`int`): Current step count.
            prev_sparsity (:obj:`float`): Sparsity at previous step.
            config (:py:class:`ModuleOptimizationConfig`): Optimization
                config for the module which contains information such as
                target sparsity and initial sparsity.
        
coremltools/optimize/torch/pruning/pruning_scheduler.py