code: def test_sequence_grad_as_numpy_false(device_id, precision):
      from .. import sequence
  
      a = sequence.input_variable(
          shape=(1,),
          dtype=PRECISION_TO_TYPE[precision],
          needs_gradient=True,
          name="a",
      )
  
      sequence_sum_a_plus_sequence_sum_a = sequence.reduce_sum(
          a
      ) + sequence.reduce_sum(a)
  
      a_data = [
          AA([[2]], dtype=PRECISION_TO_TYPE[precision]),
          AA([[2], [3]], dtype=PRECISION_TO_TYPE[precision]),
          AA([[2], [3], [4]], dtype=PRECISION_TO_TYPE[precision]),
      ]
  
      actual_grad = sequence_sum_a_plus_sequence_sum_a.grad(
          {a: a_data}, [a], as_numpy=False
      )
  
      test_op = a + 1
      result = test_op.eval({a: actual_grad})
      assert np.array_equal(result[0], np.asarray([[3.0]]))
      assert np.array_equal(result[1], np.asarray([[3.0], [3.0]]))
      assert np.array_equal(
          result[2], np.asarray([[3.0], [3.0], [3.0]])
      )
  
file_path: CNTK/bindings/python/cntk/ops/tests/evaluation_test.py
imports: from __future__ import division
  import numpy
  import pytest
  from .ops_test_utils import _test_binary_op, AA, precision, PRECISION_TO_TYPE, unittest_helper
  from cntk import dropout, combine
  import cntk
label_desc: Use image node_id 1 for calling a global function with example usage: test_sequence_grad_as_numpy_false(device_id, precision) without return types