code: def _testEvalOnShapes(self, transformer, allow_static_outputs):
      # A class that's not convertable to tensor
      class Thing:
          def __init__(self, value):
              self.value = value
  
      def f(a, b, reverse=False):
          res = tf_np.sum(tf_np.sqrt(tf_np.exp(a)) + b)
          res = (res, 10)
          if allow_static_outputs:
              res = res + (Thing(20),)
          if reverse:
              res = tuple(reversed(res))
          return res
  
      f_prime = transformer(
          f,
          static_argnums=(2,),
          allow_static_outputs=allow_static_outputs,
      )
      shape = [10]
      dtype = np.float16
      a = tf_np.zeros(shape=shape, dtype=dtype)
      b = tf_np.zeros(shape=shape, dtype=dtype)
      expected, *_ = f(a, b)
      got = f_prime(a, b)
  
      def check(got):
          self.assertIsInstance(got[0], (tf.TensorSpec, tf_np.ndarray))
          self.assertAllEqual(expected.shape, got[0].shape)
          self.assertAllEqual(expected.dtype, got[0].dtype)
          if allow_static_outputs:
              self.assertIsInstance(got[1], int)
              self.assertEqual(10, got[1])
              self.assertIsInstance(got[2], Thing)
              self.assertEqual(20, got[2].value)
          else:
              self.assertIsInstance(
                  got[1], (tf.TensorSpec, tf_np.ndarray)
              )
              self.assertAllEqual((), got[1].shape)
  
      check(got)
      # Call again since the code path is different on second call
      got = f_prime(a, b)
      check(got)
      # Retrace and check again
      got = f_prime(a, b, True)
      check(tuple(reversed(got)))
      got = f_prime(a, b, True)
      check(tuple(reversed(got)))
  
imports: import functools
  import itertools
  from absl import flags
  from absl.testing import parameterized
  from jax import lax
  import numpy
  import tensorflow.compat.v2
  from trax.tf_numpy import extensions
  import trax.tf_numpy.numpy
label_desc: Use image node_id 11 for calling the ExtensionsTest obj's underlying member method code with example usage: obj._testEvalOnShapes(transformer, allow_static_outputs) and returns: res