code: def test_raises_missing_files(
      self,
      tmpdir,
      model_configs,
      custom_encoder,
      custom_decoder,
      custom_discriminator,
  ):
      tmpdir.mkdir("dummy_folder")
      dir_path = dir_path = os.path.join(tmpdir, "dummy_folder")
  
      model = VAEGAN(
          model_configs,
          encoder=custom_encoder,
          decoder=custom_decoder,
          discriminator=custom_discriminator,
      )
  
      model.state_dict()["encoder.layers.0.0.weight"][0] = 0
  
      model.save(dir_path=dir_path)
  
      os.remove(os.path.join(dir_path, "discriminator.pkl"))
  
      # check raises decoder.pkl is missing
      with pytest.raises(FileNotFoundError):
          model_rec = AutoModel.load_from_folder(dir_path)
  
      os.remove(os.path.join(dir_path, "decoder.pkl"))
  
      # check raises decoder.pkl is missing
      with pytest.raises(FileNotFoundError):
          model_rec = AutoModel.load_from_folder(dir_path)
  
      os.remove(os.path.join(dir_path, "encoder.pkl"))
  
      # check raises encoder.pkl is missing
      with pytest.raises(FileNotFoundError):
          model_rec = AutoModel.load_from_folder(dir_path)
  
      os.remove(os.path.join(dir_path, "model.pt"))
  
      # check raises encoder.pkl is missing
      with pytest.raises(FileNotFoundError):
          model_rec = AutoModel.load_from_folder(dir_path)
  
      os.remove(os.path.join(dir_path, "model_config.json"))
  
      # check raises encoder.pkl is missing
      with pytest.raises(FileNotFoundError):
          model_rec = AutoModel.load_from_folder(dir_path)
  
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 6 for calling the Test_Model_Saving obj's underlying member method code with example usage: obj.test_raises_missing_files(tmpdir, model_configs, custom_encoder, custom_decoder, custom_discriminator) without return types