code: def test_debias_ewma():
      """Test debias_ewma experimental feature"""
      model = Linear(2, 2, bias=False)
      optim = AdaScale(
          SGD(model.parameters(), lr=0.1),
          num_gradients_to_accumulate=2,
          debias_ewma=True,
      )
      for _ in range(4):
          out = model(Tensor([0.0, 1.0]))
          out.sum().backward()
          out = model(Tensor([1.0, 0.0]))
          out.sum().backward()
          assert np.allclose(optim.gain(), 2.0), optim.gain()
          optim.step()
          optim.zero_grad()
  
imports: import tempfile
  import numpy
  import pytest
  import torch
  from torch import Tensor
  from torch.nn import Linear, Sequential
  from torch.optim import SGD
  from torch.optim.lr_scheduler import LambdaLR
  from fairscale.fair_dev.testing.golden_testing_data import adascale_test_data
  from fairscale.fair_dev.testing.testing import make_cudnn_deterministic, skip_if_no_cuda
  from fairscale.fair_dev.testing.testing_memory import find_tensor_by_shape
  from fairscale.optim import AdaScale
label_desc: Use image node_id 8 for calling a global function with example usage: test_debias_ewma() without return types