code: def test_output_in_intermediate_node():
      x = C.input_variable((2,))
      y = C.input_variable((2,))
      x0 = np.asarray([[2.0, 1.0]], np.float32)
      y0 = np.asarray([[4.0, 6.0]], np.float32)
  
      sum_node = x + 2
      times_node = sum_node * y
  
      sum_output = times_node.forward({x: x0, y: y0}, sum_node.outputs)
  
      assert len(sum_output[1]) == 1
      assert np.allclose(
          list(sum_output[1].values())[0], np.asarray(x0 + 2)
      )
  
      two_nodes_output = times_node.forward(
          {x: x0, y: y0}, times_node.outputs + sum_node.outputs
      )
  
      assert len(two_nodes_output[1]) == 2
  
      sum_forward = np.asarray(x0 + 2)
      expected_results = [sum_forward, sum_forward * y0]
  
      assert compare_lists_of_np_arrays(
          list(two_nodes_output[1].values()), expected_results
      )
  
imports: import numpy
  import os
  import pytest
  import cntk
  from .ops_test_utils import compare_lists_of_np_arrays, AA, cntk_device
  from cntk.io import MinibatchSource, CTFDeserializer, StreamDefs, StreamDef
label_desc: Use image node_id 7 for calling a global function with example usage: test_output_in_intermediate_node() without return types