code: def test_replace_placeholders():
      p = C.placeholder(shape=(1,))
      i = C.input_variable(shape=(1,), needs_gradient=True, name="i")
      res = p + 3
      res.replace_placeholders({p: i})
  
      assert res.eval({i: [[3]]}) == [6]
  
      func = C.plus(i, 10)
      res2 = p + 3
      res2.replace_placeholders({p: func.output})
  
      assert res2.eval({i: [[3]]}) == [16]
  
      func = C.plus(i, 11)
      res3 = p + 3
      res3.replace_placeholders({p: func})
  
      assert res3.eval({i: [[3]]}) == [17]
  
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 3 for calling a global function with example usage: test_replace_placeholders() without return types