code: def test_sequence_reduce_sum_over_scalar():
      x = C.sequence.input_variable(shape=(), needs_gradient=True)
      op = C.sequence.reduce_sum(x)
  
      grad, result = op.grad(
          {
              x: [
                  np.asarray([-1, 3, 5], dtype=np.float32),
                  np.asarray([2, -5], dtype=np.float32),
                  np.asarray([-2], dtype=np.float32),
              ]
          },
          outputs=[op],
      )
      assert np.array_equal(result, [7, -3, -2])
      assert np.array_equal(grad[0], [1, 1, 1])
      assert np.array_equal(grad[1], [1, 1])
      assert np.array_equal(grad[2], [1])
  
imports: from __future__ import division
  import numpy
  import pytest
  import cntk
  from .ops_test_utils import cntk_device
  from cntk.tests.test_utils import _to_dense, _to_csr
  from .ops_test_utils import unittest_helper, _test_unary_op, _test_binary_op, AA, precision, PRECISION_TO_TYPE, cntk_device
  from cntk import Value
  from cntk.axis import Axis
  from cntk.internal import sanitize_dtype_cntk
  from ..None import constant
label_desc: Use image node_id 16 for calling a global function with example usage: test_sequence_reduce_sum_over_scalar() without return types