code: def _update_sparse_goals_by_ratio(self, ratio: float):
      for module_name, tg in self.sparse_goals.items():
          for target_name, target_goals in tg.items():
              for scheduled_key, goal in target_goals.items():
                  setattr(
                      self._target_spaces[module_name][target_name],
                      scheduled_key,
                      goal * ratio,
                  )
  
imports: from __future__ import annotations
  from collections import defaultdict
  import logging
  from typing import Dict, List
  import torch
  from ..base.compressor import Pruner
  from ..base.wrapper import ModuleWrapper
  from ..utils import Evaluator, _EVALUATOR_DOCSTRING
  from .basic_pruner import LevelPruner, L1NormPruner, L2NormPruner, FPGMPruner
  from .slim_pruner import SlimPruner
  from .taylor_pruner import TaylorPruner
label_desc: Use image node_id 4 for calling the ScheduledPruner obj's underlying member method code with example usage: obj._update_sparse_goals_by_ratio(ratio) without return types