code: def _test_loop():
      x = ops.Const(5)
      y = ops.Const(0)
      with ops.loop():
          ops.stop_if(ops.EQ([x, ops.Const(0)]))
          ops.Add([x, ops.Const(-1)], [x])
          ops.Add([y, ops.Const(1)], [y])
      return y
  
imports: from caffe2.python import workspace
  from caffe2.python.core import Plan, to_execution_step, Net
  from caffe2.python.task import Task, TaskGroup, final_output
  from caffe2.python.net_builder import ops, NetBuilder
  from caffe2.python.session import LocalSession
  import unittest
  import threading
label_desc: Use image node_id 2 for calling a global function with example usage: _test_loop() and returns: y