code: def test_set_custom_scheduler(
      self,
      model_sample,
      train_dataset,
      training_configs_learning_rate,
      scheduler_config,
  ):
      trainer = BaseTrainer(
          model=model_sample,
          train_dataset=train_dataset,
          training_config=training_configs_learning_rate,
      )
  
      trainer.set_optimizer()
      trainer.set_scheduler()
  
      assert issubclass(
          type(trainer.scheduler),
          getattr(
              torch.optim.lr_scheduler,
              scheduler_config["scheduler_cls"],
          ),
      )
      if scheduler_config["scheduler_params"] is not None:
          assert all(
              [
                  trainer.scheduler.state_dict()[key]
                  == scheduler_config["scheduler_params"][key]
                  for key in scheduler_config["scheduler_params"].keys()
              ]
          )
  
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 7 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