code: def test_sequence_reduce_over_reduced_scalar():
      x = C.sequence.input_variable(shape=(1), needs_gradient=True)
      op = C.sequence.reduce_sum(C.reduce_sum(x))
  
      grad, result = op.grad(
          {x: np.asarray([[-1], [3], [5]], dtype=np.float32)},
          outputs=[op],
      )
      assert np.array_equal(result, [7.0])
      assert np.array_equal(grad[0], [[1.0], [1.0], [1.0]])
  
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 17 for calling a global function with example usage: test_sequence_reduce_over_reduced_scalar() without return types