code: def _init_sparse_goals(self):
      if self._goals_initialized:
          _logger.warning("Sparse goals have already initialized.")
          return
      for module_name, ts in self._target_spaces.items():
          for target_name, target_space in ts.items():
              self.sparse_goals[module_name][target_name] = {}
              for scheduled_key in self._scheduled_keys:
                  if getattr(target_space, scheduled_key) is not None:
                      self.sparse_goals[module_name][target_name][
                          scheduled_key
                      ] = getattr(target_space, scheduled_key)
      self._goals_initialized = True
  
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 2 for calling the ScheduledPruner obj's underlying member method code with example usage: obj._init_sparse_goals() without return types