code: def _get_head_from_config(self):
      _head_callable = getattr(blocks, self.hparams.head)
      self.hparams.head_config.input_dim = self.backbone.output_dim
      return _head_callable(
          config=_head_callable._config_template(
              **self.hparams.head_config
          ),
      )
  
imports: from typing import Dict, Optional, Union
  import torch
  import torch.nn
  from omegaconf import DictConfig, OmegaConf
  from torch import Tensor
  from pytorch_tabular import models
  from pytorch_tabular.config.config import ModelConfig
  from pytorch_tabular.models.common.heads import blocks
  from pytorch_tabular.models.tab_transformer.tab_transformer import TabTransformerBackbone
  from pytorch_tabular.tabular_model import getattr_nested
  from pytorch_tabular.utils import get_logger
  from ..base_model import BaseModel, safe_merge_config
label_desc: Use image node_id 2 for calling the MDNModel obj's underlying member method code with example usage: obj._get_head_from_config() and returns: _head_callable