code: def test_state_dict_memory_efficient():
      # TODO: Optimizer state gets cast to FP16 and back to FP32 for
      # mixed-precision and memory-efficient mixed-precision, resulting
      # in a potential loss of precision. Thus, as training proceeds, we don't
      # necessarily expect the parameters to remain the exact same.
      weight, bias, input = make_half_precision_params()
      optimizer = Adam(
          [weight, bias],
          lr=1e-3,
          precision=Precision.MEMORY_EFFICIENT_MIXED_PRECISION,
      )
  
      state_dict_test(optimizer, weight, bias, input)
  
imports: from copy import deepcopy
  import functools
  import pytest
  import torch
label_desc: Use image node_id 17 for calling a global function with example usage: test_state_dict_memory_efficient() without return types