code: def test_build_fp32_params():
      weight = torch.randn(10, 5).cuda().half().requires_grad_()
      bias = torch.randn(10).cuda().half().requires_grad_()
      optimizer = Adam([weight, bias], lr=1e-3)
      optimizer._build_fp32_params([weight, bias])
      for fp32_group, fp16_group in zip(
          optimizer.fp32_param_groups, optimizer.param_groups
      ):
          for fp32_p, fp16_p in zip(
              fp32_group["params"], fp16_group["params"]
          ):
              assert fp32_p.dtype == torch.float32
              if fp16_p.requires_grad:
                  assert fp16_p.dtype == torch.float16
                  (fp32_p - fp16_p).to("cpu").detach().apply_(
                      assert_almost_zero
                  )
  
imports: from copy import deepcopy
  import functools
  import pytest
  import torch
label_desc: Use image node_id 21 for calling a global function with example usage: test_build_fp32_params() without return types