code: def test_custom_smoothing_factor():
      """Test custom smoothing since we had a bug around it."""
      model = Linear(1, 1)
      optim = AdaScale(
          SGD(model.parameters(), lr=0.1),
          smoothing=0.12345,
          num_gradients_to_accumulate=3,
      )
      assert optim._smoothing == 0.12345
  
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 12 for calling a global function with example usage: test_custom_smoothing_factor() without return types