code: def test(self, adam_type, torch_impl):
      config_dict = {
          "train_batch_size": 1,
          "steps_per_print": 1,
          "fp16": {"enabled": True, "initial_scale_power": 10},
          "optimizer": {
              "type": adam_type,
              "torch_adam": torch_impl,
              "params": {"lr": 0.00015},
          },
      }
      hidden_dim = 10
  
      model = SimpleModel(hidden_dim)
      model, _, _, _ = deepspeed.initialize(
          config=config_dict,
          model=model,
          model_parameters=model.parameters(),
      )
  
      data_loader = random_dataloader(
          model=model,
          total_samples=10,
          hidden_dim=hidden_dim,
          device=model.device,
      )
  
      for _, batch in enumerate(data_loader):
          loss = model(batch[0], batch[1])
          model.backward(loss)
          model.step()
  
imports: import torch
  import deepspeed.comm
  import deepspeed
  import pytest
  from deepspeed.ops.adam import FusedAdam
  from unit.common import DistributedTest
  from unit.simple_model import SimpleModel, SimpleOptimizer, random_dataloader, SimpleMoEModel, sequence_dataloader
  from deepspeed.runtime.utils import required_torch_version
  from deepspeed.accelerator import get_accelerator
  from deepspeed.ops.op_builder import CPUAdamBuilder
label_desc: Use image node_id 1 for calling the TestFP16AdamTypes obj's underlying member method code with example usage: obj.test(adam_type, torch_impl) without return types