code: def test_shape_assertion_success(self):
      x = np.ones((3, 5), dtype=np.int32)
      res = np.int32(x.shape[0])
  
      def f(x):  # x: f32[b, 5] and b = 3
          # return x.shape[0]
          module, version = serialize(
              """
  module @jit_fun.1 attributes {jax.uses_shape_polymorphism = true} {
    func.func public @main(%arg1: tensor<?x5xi32>) -> tensor<i32> {
      %b = "stablehlo.get_dimension_size"(%arg1) {dimension = 0 : i64} : (tensor<?x5xi32>) -> tensor<i32>
      %3 = stablehlo.constant dense<3> : tensor<i32>
      %ok = stablehlo.compare  EQ, %b, %3,  SIGNED : (tensor<i32>, tensor<i32>) -> tensor<i1>
      stablehlo.custom_call @shape_assertion(%ok) {
        error_message = "The error message",
        has_side_effect = true
      } : (tensor<i1>) -> ()
      return %b : tensor<i32>
    }
  
  }
  """
          )
          return xla.call_module(
              [
                  x,
              ],
              version=version,
              module=module,
              Tout=[res.dtype],
              Sout=[res.shape],
              platforms=[self.testing_platform()],
          )
  
      self._assertOpOutputMatchesExpected(f, (x,), (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 25 for calling the XlaCallModuleOpTest obj's underlying member method code with example usage: obj.test_shape_assertion_success() and returns: xla