code: def test_root_block_clone():
      from .. import placeholder, as_block, parameter, times
  
      x = C.input_variable((1,), name="input")
  
      operand_placeholder = placeholder(name="placeholder")
      w = parameter(shape=(1, 1), init=1)
      b1 = parameter(shape=(1,), init=2)
      block_composite = times(operand_placeholder, w) + b1
      dense_block = as_block(
          block_composite, [(operand_placeholder, x)], "dense"
      )
  
      b2 = parameter(shape=(1,), init=3)
      replacement = dense_block + b2
      dense_block_clone = dense_block.clone(
          "share", {dense_block: replacement}
      )
      assert (
          replacement.root_function.uid
          == dense_block_clone.root_function.uid
      )
  
      assert dense_block_clone.parameters[0].uid == w.uid
      assert dense_block_clone.parameters[1].uid == b1.uid
      assert dense_block_clone.parameters[2].uid == b2.uid
  
      result = dense_block_clone.eval(
          {x: [np.asarray([2.0], dtype=np.float32)]}
      )
      assert np.array_equal(result, [[7.0]])
  
file_path: CNTK/bindings/python/cntk/ops/tests/block_test.py
imports: from __future__ import division
  import numpy
  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.axis import Axis
  from cntk.internal import sanitize_dtype_cntk
  from ..None import constant
label_desc: Use image node_id 6 for calling a global function with example usage: test_root_block_clone() without return types