code: def _setup_encoder_decoder(
      self,
      encoder,
      encoder_config,
      decoder,
      decoder_config,
      inferred_config,
  ):
      assert (encoder is not None) or (
          encoder_config is not None
      ), "Either encoder or encoder_config must be provided"
      # assert (decoder is not None) or (decoder_config is not None),
      # "Either decoder or decoder_config must be provided"
      if encoder is not None:
          self.encoder = encoder
          self._custom_decoder = True
      else:
          # Since encoder is not provided, we will use the encoder_config
          model_callable = getattr_nested(
              encoder_config._module_src, encoder_config._backbone_name
          )
          self.encoder = model_callable(
              safe_merge_config(encoder_config, inferred_config),
              # inferred_config=inferred_config,
          )
      if decoder is not None:
          self.decoder = decoder
          self._custom_encoder = True
      elif decoder_config is not None:
          # Since decoder is not provided, we will use the decoder_config
          model_callable = getattr_nested(
              decoder_config._module_src, decoder_config._backbone_name
          )
          self.decoder = model_callable(
              safe_merge_config(decoder_config, inferred_config),
              # inferred_config=inferred_config,
          )
      else:
          self.decoder = nn.Identity()
  
imports: import warnings
  from abc import ABCMeta, abstractmethod
  from typing import Dict, Optional
  import pytorch_lightning
  import torch
  import torch.nn
  from omegaconf import DictConfig, OmegaConf
  from pytorch_tabular.models.base_model import _create_optimizer
  from pytorch_tabular.utils import get_logger, getattr_nested, reset_all_weights
label_desc: Use image node_id 2 for calling the SSLBaseModel obj's underlying member method code with example usage: obj._setup_encoder_decoder(encoder, encoder_config, decoder, decoder_config, inferred_config) without return types