code: def test_build_model(self, model_configs):
      model = VAEGAN(model_configs)
      assert all(
          [
              model.input_dim == model_configs.input_dim,
              model.latent_dim == model_configs.latent_dim,
          ]
      )
  
      # check raises error with adv scale > 1
      conf = VAEGANConfig(
          input_dim=(1, 2, 18),
          latent_dim=5,
          adversarial_loss_scale=2 + np.random.rand(),
      )
      with pytest.raises(AssertionError):
          VAEGAN(conf)
  
      # check raises error with adv scale < 0
      conf = VAEGANConfig(
          input_dim=(1, 2, 18),
          latent_dim=5,
          adversarial_loss_scale=2 + np.random.rand(),
      )
      with pytest.raises(AssertionError):
          a = VAEGAN(conf)
  
      conf = VAEGANConfig(
          input_dim=(1, 2, 18),
          latent_dim=5,
          reconstruction_layer=5 + np.random.randint(1, 3),
      )
      with pytest.raises(AssertionError):
          a = VAEGAN(conf)
  
imports: import os
  from copy import deepcopy
  import numpy
  import pytest
  import torch
  from pythae.customexception import BadInheritanceError
  from pythae.models import VAEGAN, AutoModel, VAEGANConfig
  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 BaseTrainerConfig, CoupledOptimizerAdversarialTrainer, CoupledOptimizerAdversarialTrainerConfig
  from tests.data.custom_architectures import Decoder_AE_Conv, Discriminator_MLP_Custom, Encoder_VAE_Conv, NetBadInheritance
label_desc: Use image node_id 2 for calling the Test_Model_Building obj's underlying member method code with example usage: obj.test_build_model(model_configs) without return types