code: def test_op_reshape_gradient_accumulation(device_id, precision):
      from .. import reshape
  
      input_shape = (2, 3)
      output_shape = (3, 2)
      expected_output_shape = (3, 2)
  
      num_tensor_elements = np.multiply.reduce(input_shape)
      input_tensor = np.arange(
          num_tensor_elements, dtype=PRECISION_TO_TYPE[precision]
      )
      input_reshaped = input_tensor.reshape(expected_output_shape)
  
      a = C.input_variable(
          shape=input_tensor.shape,
          dtype=sanitize_dtype_cntk(PRECISION_TO_TYPE[precision]),
          needs_gradient=True,
          name="a",
      )
  
      a_reshaped1 = reshape(a, output_shape)
      a_reshaped2 = reshape(a, output_shape)
  
      input_op = a_reshaped1 + a_reshaped2
  
      resulting_multiplicative_factor = 2
      expected_forward = [
          input_reshaped * resulting_multiplicative_factor
      ]
  
      # create batch
      input_tensor.shape = (1,) + input_tensor.shape
      expected_backward = {
          a: np.full(
              input_tensor.shape,
              resulting_multiplicative_factor,
              dtype=PRECISION_TO_TYPE[precision],
          )
      }
  
      forward_input = {a: input_tensor}
  
      unittest_helper(
          input_op,
          forward_input,
          expected_forward,
          expected_backward,
          device_id=device_id,
          precision=precision,
      )
  
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
  import cntk
  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 3 for calling a global function with example usage: test_op_reshape_gradient_accumulation(device_id, precision) without return types