code: def __init__(
      self,
      model: torch.nn.Module,
      config_list: List[Dict],
      evaluator: Evaluator | None = None,
      existed_wrappers: Dict[str, ModuleWrapper] | None = None,
  ):
      assert self.mode in ["pruning", "quantization", "distillation"]
      self.bound_model = model
      self.config_list = trans_legacy_config_list(deepcopy(config_list))
      self._validate_config()
      self.evaluator = evaluator
      if self.evaluator is not None:
          assert isinstance(evaluator, Evaluator)
          if not evaluator._initialization_complete:
              evaluator._init_optimizer_helpers(self.bound_model)
  
      self._is_wrapped = False
      self._module_wrappers, self._target_spaces = register_wrappers(
          self.bound_model,
          self.config_list,
          self.mode,
          existed_wrappers,
      )
      self.wrap_model()
  
      self.fused_compressors = [self]
  
imports: from __future__ import annotations
  from collections import defaultdict
  from copy import deepcopy
  import logging
  from typing import Any, Dict, List, Literal, Callable
  import torch
  from torch.utils._pytree import tree_map
  from .config import trans_legacy_config_list, default_config_schema
  from .target_space import TargetSpace, TargetType, DistillationTargetSpace, PruningTargetSpace, QuantizationTargetSpace
  from .wrapper import ModuleWrapper, register_wrappers
  from ..utils import Evaluator, Scaling, _EVALUATOR_DOCSTRING
label_desc: Use image node_id 1 to create a new Compressor object  with example: obj = Compressor(model, config_list, evaluator, existed_wrappers)