code: def test_tf_tensor_array_new_illegal_input(self):
      with self.assertRaises(ValueError):
          data_structures.tf_tensor_array_new([3, 4.0])
      with self.assertRaises(ValueError):
          data_structures.tf_tensor_array_new(
              [3, 4], element_dtype=dtypes.float32
          )
      with self.assertRaises(ValueError):
          data_structures.tf_tensor_array_new([3, [4, 5]])
      with self.assertRaises(ValueError):
          data_structures.tf_tensor_array_new(
              [3, 4], element_shape=(2,)
          )
      with self.assertRaises(ValueError):
          data_structures.tf_tensor_array_new([], element_shape=(2,))
      # TAs can infer the shape.
      self.assertIsNot(
          data_structures.tf_tensor_array_new(
              [], element_dtype=dtypes.float32
          ),
          None,
      )
  
imports: from tensorflow.python.autograph.operators import data_structures
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import list_ops
  from tensorflow.python.ops import tensor_array_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 8 for calling the ListTest obj's underlying member method code with example usage: obj.test_tf_tensor_array_new_illegal_input() without return types