code: def test_set_custom_scheduler(
      self,
      model_sample,
      train_dataset,
      training_configs_learning_rate,
      scheduler_config,
  ):
      trainer = AdversarialTrainer(
          model=model_sample,
          train_dataset=train_dataset,
          training_config=training_configs_learning_rate,
      )
  
      trainer.set_autoencoder_optimizer()
      trainer.set_autoencoder_scheduler()
      trainer.set_discriminator_optimizer()
      trainer.set_discriminator_scheduler()
  
      if scheduler_config["autoencoder_scheduler_cls"] is None:
          assert trainer.autoencoder_scheduler is None
      else:
          assert issubclass(
              type(trainer.autoencoder_scheduler),
              getattr(
                  torch.optim.lr_scheduler,
                  scheduler_config["autoencoder_scheduler_cls"],
              ),
          )
          if (
              scheduler_config["autoencoder_scheduler_params"]
              is not None
          ):
              assert all(
                  [
                      trainer.autoencoder_scheduler.state_dict()[key]
                      == scheduler_config[
                          "autoencoder_scheduler_params"
                      ][key]
                      for key in scheduler_config[
                          "autoencoder_scheduler_params"
                      ].keys()
                  ]
              )
  
      if scheduler_config["discriminator_scheduler_cls"] is None:
          assert trainer.discriminator_scheduler is None
  
      else:
          assert issubclass(
              type(trainer.discriminator_scheduler),
              getattr(
                  torch.optim.lr_scheduler,
                  scheduler_config["discriminator_scheduler_cls"],
              ),
          )
          if (
              scheduler_config["discriminator_scheduler_params"]
              is not None
          ):
              assert all(
                  [
                      trainer.discriminator_scheduler.state_dict()[key]
                      == scheduler_config[
                          "discriminator_scheduler_params"
                      ][key]
                      for key in scheduler_config[
                          "discriminator_scheduler_params"
                      ].keys()
                  ]
              )
  
imports: import os
  from copy import deepcopy
  import pytest
  import torch
  from pythae.models import Adversarial_AE, Adversarial_AE_Config
  from pythae.trainers import AdversarialTrainer, AdversarialTrainerConfig
  from tests.data.custom_architectures import *
label_desc: Use image node_id 6 for calling the Test_Build_Scheduler obj's underlying member method code with example usage: obj.test_set_custom_scheduler(model_sample, train_dataset, training_configs_learning_rate, scheduler_config) without return types