code: def rhvae(
      self,
      rhvae_config,
      corrupted_encoder,
      corrupted_decoder,
      corrupted_metric,
      request,
  ):
      # randomized
  
      alpha = request.param
  
      if alpha < 0.125:
          rhvae_config.input_dim = rhvae_config.input_dim[:-1] + (
              rhvae_config.input_dim[-1] - 1,
          )
          # create error on input dim
          model = RHVAE(rhvae_config)
  
      elif 0.125 <= alpha < 0.25:
          model = RHVAE(rhvae_config, encoder=corrupted_encoder)
  
      elif 0.25 <= alpha < 0.375:
          model = RHVAE(rhvae_config, decoder=corrupted_decoder)
  
      elif 0.375 <= alpha < 0.5:
          model = RHVAE(rhvae_config, metric=corrupted_metric)
  
      elif 0.5 <= alpha < 0.625:
          model = RHVAE(
              rhvae_config,
              encoder=corrupted_encoder,
              decoder=corrupted_decoder,
          )
  
      elif 0.625 <= alpha < 0:
          model = RHVAE(
              rhvae_config,
              encoder=corrupted_encoder,
              metric=corrupted_metric,
          )
  
      elif 0.750 <= alpha < 0.875:
          model = RHVAE(
              rhvae_config,
              decoder=corrupted_decoder,
              metric=corrupted_metric,
          )
  
      else:
          model = RHVAE(
              rhvae_config,
              encoder=corrupted_encoder,
              decoder=corrupted_decoder,
              metric=corrupted_metric,
          )
  
      return model
  
imports: import os
  from copy import deepcopy
  import pytest
  import torch
  from pythae.customexception import ModelError
  from pythae.models import AE, RHVAE, VAE, AEConfig, RHVAEConfig, VAEConfig
  from pythae.trainers import BaseTrainer, BaseTrainerConfig
  from tests.data.custom_architectures import *
label_desc: Use image node_id 5 for calling the Test_Sanity_Checks obj's underlying member method code with example usage: obj.rhvae(rhvae_config, corrupted_encoder, corrupted_decoder, corrupted_metric, request) and returns: model