code: def _test_outer():
      x = ops.Const(10)
      # test stop_if(False)
      with ops.stop_guard() as g1:
          _test_inner_stop(x)
  
      # test stop_if(True)
      y = ops.Const(3)
      with ops.stop_guard() as g2:
          _test_inner_stop(y)
  
      # test no stop
      with ops.stop_guard() as g4:
          ops.Const(0)
  
      # test empty clause
      with ops.stop_guard() as g3:
          pass
  
      return (
          g1.has_stopped(),
          g2.has_stopped(),
          g3.has_stopped(),
          g4.has_stopped(),
      )
  
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 4 for calling a global function with example usage: _test_outer() and returns: g1,  g2,  g3,  g4