docstr: A TensorFlow function call inside StableHLO.
docstr_tok: ["A","TensorFlow","function","call","inside","StableHLO","."]
code: def test_shape_polymorphic_tf_call_function(self):
      """A TensorFlow function call inside StableHLO."""
      x = np.full((2,), 2, dtype=np.int32)
      y = np.full((2,), 3, dtype=np.int32)
      res = x + y
  
      @function.Defun(dtypes.int32, dtypes.int32)
      def foo(x, y):
          return x + y
  
      def f(x, y):
          module, version = serialize(
              """
  module @jit_fun_flat_jax attributes {jax.uses_shape_polymorphism = true} {
    func.func public @main(%arg0: tensor<?xi32>, %arg1: tensor<?xi32>) -> tensor<?xi32> {
      %0 = stablehlo.get_dimension_size %arg0, dim = 0 : (tensor<?xi32>) -> tensor<i32>
      %1 = stablehlo.custom_call @tf.call_tf_function(%arg0, %arg1, %0) {
        tf.backend_config = {called_index = 0},
        indices_of_shape_operands = dense<[2]> : tensor<1xi64>
      } : (tensor<?xi32>, tensor<?xi32>, tensor<i32>) -> tensor<?xi32>
      return %1 : tensor<?xi32>
    }
  }
  """
          )
          return xla.call_module(
              [x, y],
              version=version,
              module=module,
              Tout=[res.dtype],
              Sout=[res.shape],
              platforms=[self.testing_platform()],
              function_list=(foo,),
          )
  
      self._assertOpOutputMatchesExpected(f, (x, y), (res,))
  
imports: import os
  import re
  from typing import Optional, Sequence
  import unittest
  from absl.testing import parameterized
  import numpy
  from tensorflow.compiler.mlir.stablehlo import stablehlo
  from tensorflow.compiler.tests import xla_test
  from tensorflow.compiler.tf2xla.ops import gen_xla_ops
  from tensorflow.compiler.tf2xla.python import xla
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import function
  from tensorflow.python.framework import ops
  from tensorflow.python.platform import googletest
  from tensorflow.python.platform import test
label_desc: Use image node_id 44 for calling the XlaCallModuleOpTest obj's underlying member method code with example usage: obj.test_shape_polymorphic_tf_call_function() and returns: unknown, xla