code: def test_update_optim_scale():
      weight, bias, input = make_half_precision_params()
      optimizer = Adam(
          [weight, bias], lr=1e-3, precision=Precision.PURE_FP16
      )
      optimizer._optim_scale_update_freq = 1
      optimizer._optim_scale = 2**15
  
      optimizer.zero_grad()
      loss = (weight.mv(input) + bias).pow(2).sum()
      loss.backward()
      optimizer.step()
  
      assert optimizer._optim_scale == 2**16
  
imports: from copy import deepcopy
  import functools
  import pytest
  import torch
label_desc: Use image node_id 19 for calling a global function with example usage: test_update_optim_scale() without return types