code: def test_raises_bad_inheritance(self, model_configs, bad_net):
      with pytest.raises(BadInheritanceError):
          adversarial_ae = Adversarial_AE(
              model_configs, encoder=bad_net
          )
  
      with pytest.raises(BadInheritanceError):
          adversarial_ae = Adversarial_AE(
              model_configs, decoder=bad_net
          )
  
      with pytest.raises(BadInheritanceError):
          adversarial_ae = Adversarial_AE(
              model_configs, discriminator=bad_net
          )
  
imports: import os
  from copy import deepcopy
  import numpy
  import pytest
  import torch
  from pythae.customexception import BadInheritanceError
  from pythae.models import Adversarial_AE, Adversarial_AE_Config, AutoModel
  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, Discriminator_MLP_Custom, Encoder_VAE_Conv, NetBadInheritance
label_desc: Use image node_id 3 for calling the Test_Model_Building obj's underlying member method code with example usage: obj.test_raises_bad_inheritance(model_configs, bad_net) without return types