code: def test_nested_loops(self):
      def triangle_loop(n, add_f):
          recur = lambda f, x, c: hl.if_else(
              x <= n, f(x + 1, add_f(x, c)), c
          )
          return hl.experimental.loop(recur, hl.tint32, 0, 0)
  
      assert_evals_to(triangle_loop(5, lambda x, c: c + x), 15)
      assert_evals_to(
          triangle_loop(
              5,
              lambda x, c: c + triangle_loop(x, lambda x2, c2: c2 + x2),
          ),
          15 + 10 + 6 + 3 + 1,
      )
  
      n1 = 5
      calls_recur_from_nested_loop = hl.experimental.loop(
          lambda f, x1, c1: hl.if_else(
              x1 <= n1,
              hl.experimental.loop(
                  lambda f2, x2, c2: hl.if_else(
                      x2 <= x1, f2(x2 + 1, c2 + x2), f(x1 + 1, c1 + c2)
                  ),
                  "int32",
                  0,
                  0,
              ),
              c1,
          ),
          "int32",
          0,
          0,
      )
  
      assert_evals_to(calls_recur_from_nested_loop, 15 + 10 + 6 + 3 + 1)
  
imports: import numpy
  import hail
  import unittest
  import pytest
  from ..helpers import *
  from hail.utils import new_temp_file
label_desc: Use image node_id 19 for calling the Tests obj's underlying member method code with example usage: obj.test_nested_loops() and returns: hl