code: def test_output_subset_evaluation(device_id):
      try:
          gpu_device = C.gpu(0)
      except ValueError:
          pytest.skip("Test only runs when GPU available")
  
      device = cntk_device(device_id)
      x1 = C.input_variable(shape=())
      op1 = C.constant(value=1, shape=(1), device=device) + (
          C.constant(value=1, shape=(1), device=device) + x1
      )
  
      x2 = C.input_variable(shape=(1))
  
      # Deliberately locate the parameter on a different device
      # instead of the actual compute target device, so that
      # if we try to use this parameter, it results in an error
      if device.type() == 0:
          parameter_device = gpu_device
      else:
          parameter_device = C.cpu()
      p = C.parameter(
          shape=(1), init=C.glorot_uniform(), device=parameter_device
      )
      op2 = (x2 - C.constant(value=10, shape=(1), device=device)) - p
  
      op = C.combine([op1, op2])
  
      _, result = op.forward(
          {x1: np.asarray([1, 2, 3])}, [op1], device=device
      )
      assert np.array_equal(result[op1], np.asarray([[3], [4], [5]]))
  
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 21 for calling a global function with example usage: test_output_subset_evaluation(device_id) without return types