code: def test_discriminator(
      self, ae_cifar_config, cifar_like_data, recon_layers
  ):
      ae_cifar_config.discriminator_input_dim = (3, 32, 32)
  
      discriminator = Discriminator_Conv_CIFAR(ae_cifar_config).to(
          device
      )
  
      scores = discriminator(
          cifar_like_data, output_layer_levels=recon_layers
      )
  
      if recon_layers is None:
          assert "embedding" in scores.keys()
  
      else:
          for lev in recon_layers:
              if lev != -1:
                  assert f"embedding_layer_{lev}" in scores.keys()
  
              else:
                  assert "embedding" in scores.keys()
  
      if recon_layers is None:
          assert scores["embedding"].shape[1] == 1
  
      else:
          if 1 in recon_layers:
              assert scores[f"embedding_layer_1"].shape[1] == 128
  
          if 2 in recon_layers:
              assert scores[f"embedding_layer_2"].shape[1] == 256
  
          if 3 in recon_layers:
              assert scores[f"embedding_layer_3"].shape[1] == 512
  
          if 4 in recon_layers:
              assert scores[f"embedding_layer_4"].shape[1] == 1024
  
          if -1 in recon_layers:
              assert scores["embedding"].shape[1] == 1
  
imports: import numpy
  import pytest
  import torch
  from pythae.models import AEConfig, VAEConfig
  from pythae.models.nn.benchmarks.celeba import *
  from pythae.models.nn.benchmarks.cifar import *
  from pythae.models.nn.benchmarks.mnist import *
  from pythae.models.nn.default_architectures import *
label_desc: Use image node_id 5 for calling the Test_CIFAR_ConvNets obj's underlying member method code with example usage: obj.test_discriminator(ae_cifar_config, cifar_like_data, recon_layers) without return types