code: def testDisablingAutoBatching(self):
      execution_counter_box = [0]
  
      def count_executions(x):
          # The autobatching system will unconditionally run this exactly thrice per
          # occurrence in the source: once to infer the type, once to prove that
          # type inference stabilized, and once during graph construction.
          execution_counter_box[0] += 1
          return x
  
      def id_type(args):
          return args[0]
  
      def function(x):
          true = True
          if true:
              return count_executions(x)
          else:
              return count_executions(x)
  
      batched = frontend.Context().batch_uncurried(function, id_type)
  
      # Running the original function should increment the box once
      function(np.array([4]))
      self.assertEqual(execution_counter_box[0], 1)
  
      execution_counter_box[0] = 0
      if tf.executing_eagerly():
          # Running the batched version in eager mode should increment the box five
          # times (twice per static occurrence and once for the time it actually
          # executes)
          expected_execution_count = 5
      else:
          # Running the batched version in graph mode should increment the box six
          # times (thrice per occurrence)
          expected_execution_count = 6
      batched(np.array([4, 5, 6, 7, 8]))
      self.assertEqual(
          execution_counter_box[0], expected_execution_count
      )
  
      # Running the batched version in dry-run mode should increment the box once,
      # because that should mimic the original function.
      execution_counter_box[0] = 0
      batched(np.array([4]), dry_run=True)
      self.assertEqual(execution_counter_box[0], 1)
  
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 8 for calling the AutoGraphFrontendTest obj's underlying member method code with example usage: obj.testDisablingAutoBatching() and returns: x, args, count_executions, count_executions