code: def testParameterSwapping(self):
      # The thing that's interesting about this test program is that it contains a
      # self-call that writes variables to themselves, but misaligned.  To
      # implement this correctly, it is necessary to introduce a temporary
      # variable so that `a` and `b` can be swapped (b/135275883).
      def trace(x):
          logging.info(x)
          return x
  
      ab = frontend.Context()
  
      def gcd_type(args):
          return args[0]
  
      @ab.batch(type_inference=gcd_type)
      def gcd(a, b):
          if trace(a) == 0:
              return b
          elif a <= b:
              return gcd(a, b - a)
          else:
              # TODO(b/135275883): Remove these temporaries and check that this
              # program still works.
              a_tmp = a
              b_tmp = b
              return gcd(b_tmp, a_tmp)
  
      input_a = np.array([7, 12, 49], dtype=np.int32)
      input_b = np.array([9, 9, 56], dtype=np.int32)
      # pylint: disable=unexpected-keyword-arg
      # The `max_stack_depth` and `backend` keyword arguments to `gcd`
      # are introduced by the `@ab.batch` decorator, confusing pylint.
      self.assertAllEqual(
          [1, 3, 7],
          gcd(input_a, input_b, max_stack_depth=3, backend=NP_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 21 for calling the AutoGraphFrontendTest obj's underlying member method code with example usage: obj.testParameterSwapping() and returns: x, args, b, gcd, gcd