code: def test_set_custom_scheduler(
      self,
      model_sample,
      train_dataset,
      training_configs_learning_rate,
      scheduler_config,
  ):
      trainer = CoupledOptimizerTrainer(
          model=model_sample,
          train_dataset=train_dataset,
          training_config=training_configs_learning_rate,
      )
  
      trainer.set_encoder_optimizer()
      trainer.set_encoder_scheduler()
      trainer.set_decoder_optimizer()
      trainer.set_decoder_scheduler()
  
      if scheduler_config["encoder_scheduler_cls"] is None:
          assert trainer.encoder_scheduler is None
      else:
          assert issubclass(
              type(trainer.encoder_scheduler),
              getattr(
                  torch.optim.lr_scheduler,
                  scheduler_config["encoder_scheduler_cls"],
              ),
          )
          if scheduler_config["encoder_scheduler_params"] is not None:
              assert all(
                  [
                      trainer.encoder_scheduler.state_dict()[key]
                      == scheduler_config["encoder_scheduler_params"][
                          key
                      ]
                      for key in scheduler_config[
                          "encoder_scheduler_params"
                      ].keys()
                  ]
              )
  
      if scheduler_config["decoder_scheduler_cls"] is None:
          assert trainer.decoder_scheduler is None
  
      else:
          assert issubclass(
              type(trainer.decoder_scheduler),
              getattr(
                  torch.optim.lr_scheduler,
                  scheduler_config["decoder_scheduler_cls"],
              ),
          )
          if scheduler_config["decoder_scheduler_params"] is not None:
              assert all(
                  [
                      trainer.decoder_scheduler.state_dict()[key]
                      == scheduler_config["decoder_scheduler_params"][
                          key
                      ]
                      for key in scheduler_config[
                          "decoder_scheduler_params"
                      ].keys()
                  ]
              )
  
imports: import os
  from copy import deepcopy
  import pytest
  import torch
  from pythae.models import RAE_L2, RAE_L2_Config
  from pythae.trainers import CoupledOptimizerTrainer, CoupledOptimizerTrainerConfig
  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