code: def test_tf_tensor_list_new_illegal_input(self):
      with self.assertRaises(ValueError):
          data_structures.tf_tensor_list_new([3, 4.0])
      # TODO(mdan): It might make more sense to type cast in this case.
      with self.assertRaises(ValueError):
          data_structures.tf_tensor_list_new(
              [3, 4], element_dtype=dtypes.float32
          )
      # Tensor lists do support heterogeneous lists.
      self.assertIsNot(
          data_structures.tf_tensor_list_new([3, [4, 5]]), None
      )
      with self.assertRaises(ValueError):
          data_structures.tf_tensor_list_new([3, 4], element_shape=(2,))
      with self.assertRaises(ValueError):
          data_structures.tf_tensor_list_new(
              constant_op.constant([1, 2, 3]), element_shape=[1]
          )
  
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 6 for calling the ListTest obj's underlying member method code with example usage: obj.test_tf_tensor_list_new_illegal_input() without return types