code: def measure_runtime(device_id):
      import timeit
  
      np.random.seed(0)
      for num_hidden_layers in [1, 2, 4, 8, 16]:
          t = timeit.Timer(
              "train(MySigmoid, %i, %s)"
              % (num_hidden_layers, device_id),
              setup="from __main__ import train, MySigmoid",
          )
          timings_my_sigmoid = t.repeat(number=10)
          np.random.seed(0)
          t = timeit.Timer(
              "train(sigmoid, %i, %s)" % (num_hidden_layers, device_id),
              setup="from __main__ import train, sigmoid",
          )
          timings_sigmoid = t.repeat(number=10)
  
          print(
              "%i\t%.2f\t%.2f"
              % (
                  num_hidden_layers,
                  min(timings_my_sigmoid),
                  min(timings_sigmoid),
              )
          )
  
imports: from __future__ import division, print_function
  import numpy
  import cntk
  from cntk.ops.tests.ops_test_utils import cntk_device, mem_used, os_process
  from cntk.ops.functions import UserFunction
  from cntk import sigmoid
label_desc: Use image node_id 9 for calling a global function with example usage: measure_runtime(device_id) without return types