code: def test_loop(self):
      workspace.FeedBlob("cond", np.array(True))
      workspace.FeedBlob("ONE", np.array(1))
      workspace.FeedBlob("TWO", np.array(2))
      workspace.FeedBlob("TEN", np.array(10))
      workspace.FeedBlob("counter", np.array(0))
      workspace.FeedBlob("output_blob", np.array(0))
  
      loop_model = ModelHelper(name="loop_test_model")
      loop_model.net.Add(["output_blob", "TWO"], "output_blob")
  
      cond_model = ModelHelper(name="cond_test_model")
      cond_model.net.Add(["counter", "ONE"], "counter")
      comp_res = cond_model.net.LT(["counter", "TEN"])
      cond_model.net.Copy(comp_res, "cond")
  
      model = ModelHelper(name="test_model")
      brew.loop(
          model=model,
          cond_blob="cond",
          external_blobs=[
              "cond",
              "ONE",
              "TWO",
              "TEN",
              "counter",
              "output_blob",
          ],
          loop_model=loop_model,
          cond_model=cond_model,
      )
  
      workspace.RunNetOnce(model.param_init_net)
      workspace.RunNetOnce(model.net)
      output_value = workspace.FetchBlob("output_blob")
      self.assertEqual(output_value, 18)
  
imports: from caffe2.python import brew, core, scope, workspace
  from caffe2.python.modeling.parameter_info import ParameterTags
  from caffe2.python.model_helper import ModelHelper
  from caffe2.python.cnn import CNNModelHelper
  import unittest
  import numpy
label_desc: Use image node_id 17 for calling the BrewTest obj's underlying member method code with example usage: obj.test_loop() without return types