code: def _parse_model_hp(model):
      assert isinstance(model, dict)
      if "encoder" in model and "decoder" in model:
          return {
              "encoder": _parse_hp_space(
                  model["encoder"].pop("hp_space", None)
              ),
              "decoder": _parse_hp_space(
                  model["decoder"].pop("hp_space", None)
              ),
          }
      elif "encoder" in model:
          return {
              "encoder": _parse_hp_space(
                  model["encoder"].pop("hp_space", None)
              ),
              "decoder": None,
          }
      else:
          return _parse_hp_space(model.pop("hp_space", None))
  
imports: from typing import Any, Iterable, Tuple
  from copy import deepcopy
  import torch
  from ..module.feature import FEATURE_DICT
  from ..module.hpo import HPO_DICT
  from ..module.model import EncoderUniversalRegistry, DecoderUniversalRegistry, ModelUniversalRegistry
  from ..module.nas.algorithm import NAS_ALGO_DICT
  from ..module.nas.estimator import NAS_ESTIMATOR_DICT
  from ..module.nas.space import NAS_SPACE_DICT
  from ..module import BaseFeatureEngineer, BaseHPOptimizer, BaseTrainer
  from .utils import LeaderBoard
  from ..utils import get_logger
label_desc: Use image node_id 3 for calling a global function with example usage: _parse_model_hp(model) and returns: dict, dict, _parse_hp_space