code: def test_op_softmax_axis(sample, device_id, precision):
      t = AA(sample, dtype=PRECISION_TO_TYPE[precision])
      assert len(t.shape) == 2
  
      x_max = t - t.max()
      exp_x = np.exp(x_max)
      forward = exp_x / np.sum(exp_x)
  
      expected_forward = AA([forward])
  
      from cntk import softmax
  
      result = softmax(sample, axis=0).eval()
  
      assert np.array_equal(result, expected_forward[0])
  
imports: from __future__ import division
  import numpy
  import cntk
  import pytest
  from .ops_test_utils import unittest_helper, _test_unary_op, _test_binary_op, AA, precision, PRECISION_TO_TYPE, cntk_device
  from cntk.tests.test_utils import TOLERANCE_ABSOLUTE
  from cntk.internal.utils import eval
  from cntk.internal import sanitize_dtype_cntk
  from ..None import constant
  from cntk.variables import Parameter, Constant
label_desc: Use image node_id 23 for calling a global function with example usage: test_op_softmax_axis(sample, device_id, precision) without return types