code: def testSelfTailCallOptimization(self):
      def my_type(args):
          return args[0]
  
      ab = frontend.Context()
  
      @ab.batch(type_inference=my_type)
      def iota_sum(n, acc):
          if n <= 0:
              return acc
          else:
              return iota_sum(n - 1, acc + n)
  
      inputs = [
          np.array([12, -13, 100], dtype=np.int32),
          np.array([0, 0, 0], dtype=np.int32),
      ]
      result = ab.lowered_for_args(
          "iota_sum", inputs, backend=TF_BACKEND
      )
      # Check no pushes
      for i in range(result.graph.exit_index()):
          block = result.graph.block(i)
          if isinstance(block.terminator, instructions.PushGotoOp):
              assert (
                  False
              ), "iota_sum is tail-recursive: should not push the PC"
      for var, alloc in result.var_alloc.items():
          if alloc == instructions.VariableAllocation.FULL:
              if var != instructions.pc_var:
                  assert False, "iota_sum should not push any data"
      # pylint: disable=unexpected-keyword-arg
      # The `max_stack_depth` and `backend` keyword arguments to `iota_sum`
      # are introduced by the `@ctx.batch` decorator, confusing pylint.
      self.assertAllEqual(
          [78, 0, 5050],
          self.evaluate(
              iota_sum(*inputs, max_stack_depth=3, backend=TF_BACKEND)
          ),
      )
  
imports: import collections
  from absl import logging
  import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.experimental.auto_batching import frontend
  from tensorflow_probability.python.experimental.auto_batching import instructions
  from tensorflow_probability.python.experimental.auto_batching import numpy_backend
  from tensorflow_probability.python.experimental.auto_batching import tf_backend
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 20 for calling the AutoGraphFrontendTest obj's underlying member method code with example usage: obj.testSelfTailCallOptimization() and returns: args, acc, iota_sum