code: def test_train_step_various_updates(
      self, ae, train_dataset, trainer, optimizer_updates
  ):
      start_model_state_dict = deepcopy(trainer.model.state_dict())
  
      model_output = ae({"data": train_dataset.data.to(device)})
  
      model_output.update_encoder = bool(optimizer_updates[0])
      model_output.update_decoder = bool(optimizer_updates[1])
      model_output.update_discriminator = bool(optimizer_updates[2])
  
      trainer._optimizers_step(model_output)
  
      step_1_model_state_dict = deepcopy(trainer.model.state_dict())
  
      # check that weights were updated
      for key in start_model_state_dict.keys():
          if "encoder" in key:
              if bool(optimizer_updates[0]):
                  assert not torch.equal(
                      step_1_model_state_dict[key],
                      start_model_state_dict[key],
                  )
  
              else:
                  assert torch.equal(
                      step_1_model_state_dict[key],
                      start_model_state_dict[key],
                  )
  
          if "decoder" in key:
              if bool(optimizer_updates[1]):
                  assert not torch.equal(
                      step_1_model_state_dict[key],
                      start_model_state_dict[key],
                  )
  
              else:
                  assert torch.equal(
                      step_1_model_state_dict[key],
                      start_model_state_dict[key],
                  )
  
          if "discriminator" in key:
              if bool(optimizer_updates[2]):
                  assert not torch.equal(
                      step_1_model_state_dict[key],
                      start_model_state_dict[key],
                  )
  
              else:
                  assert torch.equal(
                      step_1_model_state_dict[key],
                      start_model_state_dict[key],
                  )
  
imports: import os
  from copy import deepcopy
  import pytest
  import torch
  from pythae.models import VAEGAN, VAEGANConfig
  from pythae.trainers import CoupledOptimizerAdversarialTrainer, CoupledOptimizerAdversarialTrainerConfig
  from tests.data.custom_architectures import *
label_desc: Use image node_id 13 for calling the Test_Main_Training obj's underlying member method code with example usage: obj.test_train_step_various_updates(ae, train_dataset, trainer, optimizer_updates) without return types