code: def register_dorefa_apply_method(self):
      for _, ts in self._target_spaces.items():
          for _, target_space in ts.items():
              if target_space.type is TargetType.PARAMETER:
                  target_space.apply_method = (
                      "dorefa_clamp_round_weight"
                  )
              elif target_space.type is TargetType.INPUT:
                  target_space.apply_method = "clamp_round"
              elif target_space.type is TargetType.OUTPUT:
                  target_space.apply_method = (
                      "dorefa_clamp_round_output"
                  )
  
imports: from __future__ import annotations
  import logging
  from typing import List, Dict, Union, overload
  import torch
  import torch.nn
  from torch import Tensor
  from nni.common.version import torch_version_is_2
  from ..base.compressor import Compressor, Quantizer
  from ..base.wrapper import ModuleWrapper
  from ..utils import Evaluator, _EVALUATOR_DOCSTRING
  from ..base.target_space import TargetType, QuantizationTargetSpace
label_desc: Use image node_id 8 for calling the DoReFaQuantizer obj's underlying member method code with example usage: obj.register_dorefa_apply_method() without return types