code: def test_get_smooth_mask_correct(labels):
      dist = Binned(**COMMON_KWARGS, label_smoothing=0.2)
      binned = Binned(**COMMON_KWARGS)
  
      labels = labels.expand_dims(-1)
  
      mask = dist._get_mask(labels)
  
      assert np.allclose(
          mask.asnumpy(), binned._get_mask(labels).asnumpy()
      )
  
      smooth_mask = dist._smooth_mask(
          mx.nd, mask, alpha=mx.nd.array([0.2])
      )
  
      # check smooth mask adds to one
      assert np.allclose(smooth_mask.asnumpy().sum(axis=-1), np.ones(2))
  
      # check smooth mask peaks same
      assert np.allclose(
          np.argmax(smooth_mask.asnumpy(), axis=-1),
          np.argmax(mask.asnumpy(), axis=-1),
      )
  
      # check smooth mask mins correct
      assert np.allclose(
          smooth_mask.asnumpy().min(axis=-1),
          np.ones(2) * 0.2 / 7,  # alpha / K
      )
  
file_path: gluonts/test/mx/distribution/test_label_smoothing.py
imports: import itertools
  import mxnet
  import numpy
  import pytest
  from gluonts.mx.distribution import Binned, BinnedOutput
label_desc: Use image node_id 3 for calling a global function with example usage: test_get_smooth_mask_correct(labels) without return types