code: def test_setup(self):
      with Task() as task:
          with ops.task_init():
              one = ops.Const(1)
          two = ops.Add([one, one])
          with ops.task_init():
              three = ops.Const(3)
          accum = ops.Add([two, three])
          # here, accum should be 5
          with ops.task_exit():
              # here, accum should be 6, since this executes after lines below
              seven_1 = ops.Add([accum, one])
          six = ops.Add([accum, one])
          ops.Add([accum, one], [accum])
          seven_2 = ops.Add([accum, one])
          o6 = final_output(six)
          o7_1 = final_output(seven_1)
          o7_2 = final_output(seven_2)
      with LocalSession() as session:
          session.run(task)
          self.assertEqual(o6.fetch(), 6)
          self.assertEqual(o7_1.fetch(), 7)
          self.assertEqual(o7_2.fetch(), 7)
  
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 6 for calling the TestNetBuilder obj's underlying member method code with example usage: obj.test_setup() without return types