code: def test(
      self,
      optimizer,
      zero_offload,
      torch_adam,
      adam_w_mode,
      resulting_optimizer,
  ):
      config_dict = {
          "train_batch_size": 2,
          "steps_per_print": 1,
          "optimizer": {
              "type": optimizer,
              "params": {
                  "lr": 0.00015,
                  "torch_adam": torch_adam,
                  "adam_w_mode": adam_w_mode,
              },
          },
          "gradient_clipping": 1.0,
          "fp16": {"enabled": True},
          "zero_optimization": {
              "stage": 2,
              "cpu_offload": zero_offload,
          },
      }
      model = SimpleModel(10)
      model, _, _, _ = deepspeed.initialize(
          config=config_dict,
          model=model,
          model_parameters=model.parameters(),
      )
      # get base optimizer under zero
      ds_optimizer = model.optimizer.optimizer
      opt_class, adam_w_mode = resulting_optimizer
      assert isinstance(ds_optimizer, opt_class)
      if adam_w_mode in [True, False]:
          assert ds_optimizer.adam_w_mode == adam_w_mode
  
file_path: DeepSpeed/tests/unit/ops/adam/test_adamw.py
imports: import deepspeed
  import torch
  import pytest
  from deepspeed.ops.adam import FusedAdam
  from deepspeed.ops.adam import DeepSpeedCPUAdam
  from unit.common import DistributedTest
  from unit.simple_model import SimpleModel
  from deepspeed.accelerator import get_accelerator
label_desc: Use image node_id 1 for calling the TestAdamConfigs obj's underlying member method code with example usage: obj.test(optimizer, zero_offload, torch_adam, adam_w_mode, resulting_optimizer) without return types