code: def test_gather_2D_using_one_hot_and_times():
      i = C.sequence.input_variable((1,))
      indices = [[2, 0], [1]]
      sparse_one_hot = C.one_hot(i, num_classes=3, sparse_output=True)
      w = C.parameter((-1, 2, 3), init=C.glorot_uniform())
      t = C.times(sparse_one_hot, w, output_rank=2)
      result = t.eval({i: indices})
      w_value = w.value
      expected_result = [
          np.stack(
              [
                  np.expand_dims(np.asarray(w_value[idx]), axis=0)
                  for idx in seq
              ]
          )
          for seq in indices
      ]
      assert np.array_equal(result[0], expected_result[0])
      assert np.array_equal(result[1], expected_result[1])
  
imports: import numpy
  import scipy
  import pytest
  import cntk
  from .ops_test_utils import cntk_device
  from cntk.axis import Axis
  from ..None import constant
  from cntk.tests.test_utils import _to_dense
label_desc: Use image node_id 7 for calling a global function with example usage: test_gather_2D_using_one_hot_and_times() without return types