code: def testTensorArraySplitIncompatibleShapesFails(self):
      with self.session(), self.test_scope():
  
          def fn():
              ta = tensor_array_ops.TensorArray(
                  dtype=dtypes.float32,
                  tensor_array_name="foo",
                  size=3,
                  infer_shape=False,
              )
              return ta.split([1.0, 2.0, 3.0], 1).flow
  
          with self.assertRaisesWithPredicateMatch(
              ValueError, r"Shape must be rank 1 but is rank 0"
          ):
              xla.compile(fn)[0].eval()
  
          def fn():
              ta = tensor_array_ops.TensorArray(
                  dtype=dtypes.float32,
                  tensor_array_name="foo",
                  size=3,
                  infer_shape=False,
              )
              return ta.split([1.0, 2.0, 3.0], [1, 2, 3]).flow
  
          with self.assertRaisesOpError(
              r"lengths must be equal: 1 vs. 2"
          ):
              xla.compile(fn)[0].eval()
  
          def fn():
              ta = tensor_array_ops.TensorArray(
                  dtype=dtypes.float32,
                  tensor_array_name="foo",
                  size=3,
                  infer_shape=False,
              )
              return ta.split(1.0, [1]).flow
  
          with self.assertRaisesOpError(r"value must have rank >= 1"):
              xla.compile(fn)[0].eval()
  
          def fn():
              ta = tensor_array_ops.TensorArray(
                  dtype=dtypes.float32,
                  tensor_array_name="foo",
                  size=2,
                  infer_shape=False,
              )
  
              return ta.split([1.0], [1]).flow
  
          with self.assertRaisesOpError(
              r"TensorArray's size is not equal to the size of lengths "
              r"\(1 vs. 2\)"
          ):
              xla.compile(fn)[0].eval()
  
imports: import numpy
  from tensorflow.compiler.tests import xla_test
  from tensorflow.python.compiler.xla import xla
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import control_flow_util
  from tensorflow.python.ops import gen_data_flow_ops
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import tensor_array_grad
  from tensorflow.python.ops import tensor_array_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 17 for calling the TensorArrayTest obj's underlying member method code with example usage: obj.testTensorArraySplitIncompatibleShapesFails() and returns: ta, ta, ta, ta