code: def factor_ae(
      self, model_configs, custom_encoder, custom_decoder, request
  ):
      # randomized
  
      alpha = request.param
  
      if alpha < 0.125:
          model = FactorVAE(model_configs)
  
      elif 0.125 <= alpha < 0.25:
          model = FactorVAE(model_configs, encoder=custom_encoder)
  
      elif 0.25 <= alpha < 0.375:
          model = FactorVAE(model_configs, decoder=custom_decoder)
  
      elif 0.375 <= alpha < 0.5:
          model = FactorVAE(model_configs)
  
      elif 0.5 <= alpha < 0.625:
          model = FactorVAE(
              model_configs,
              encoder=custom_encoder,
              decoder=custom_decoder,
          )
  
      elif 0.625 <= alpha < 0:
          model = FactorVAE(model_configs, encoder=custom_encoder)
  
      elif 0.750 <= alpha < 0.875:
          model = FactorVAE(model_configs, decoder=custom_decoder)
  
      else:
          model = FactorVAE(
              model_configs,
              encoder=custom_encoder,
              decoder=custom_decoder,
          )
  
      return model
  
imports: import os
  from copy import deepcopy
  import pytest
  import torch
  from pythae.customexception import BadInheritanceError
  from pythae.data.preprocessors import DataProcessor
  from pythae.models import AutoModel, FactorVAE, FactorVAEConfig
  from pythae.models.base.base_utils import ModelOutput
  from pythae.pipelines import GenerationPipeline, TrainingPipeline
  from pythae.samplers import GaussianMixtureSamplerConfig, IAFSamplerConfig, MAFSamplerConfig, NormalSamplerConfig, TwoStageVAESamplerConfig
  from pythae.trainers import AdversarialTrainer, AdversarialTrainerConfig, BaseTrainerConfig
  from tests.data.custom_architectures import Decoder_AE_Conv, Encoder_VAE_Conv, NetBadInheritance
label_desc: Use image node_id 3 for calling the Test_FactorVAE_Training obj's underlying member method code with example usage: obj.factor_ae(model_configs, custom_encoder, custom_decoder, request) and returns: model