code: def test_default_optimizer_building(
      self, model_sample, train_dataset, training_configs_learning_rate
  ):
      trainer = BaseTrainer(
          model=model_sample,
          train_dataset=train_dataset,
          training_config=training_configs_learning_rate,
      )
  
      trainer.set_optimizer()
  
      assert issubclass(type(trainer.optimizer), torch.optim.Adam)
      assert (
          trainer.optimizer.defaults["lr"]
          == training_configs_learning_rate.learning_rate
      )
  
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_Build_Optimizer obj's underlying member method code with example usage: obj.test_default_optimizer_building(model_sample, train_dataset, training_configs_learning_rate) without return types