docstr: Tests that exception is raised when input is malformed.
      
docstr_tok: ["Tests","that","exception","is","raised","when","input","is","malformed","."]
code: def testWithBadInputs(self):
      """Tests that exception is raised when input is malformed."""
      record_defaults = [
          constant_op.constant([], dtypes.int32),
          constant_op.constant([], dtypes.int64),
          constant_op.constant([], dtypes.float32),
          constant_op.constant([], dtypes.float64),
          constant_op.constant([], dtypes.string),
      ]
  
      column_names = ["col%d" % i for i in range(5)]
      inputs = [
          [",".join(x for x in column_names), "0,1,2,3,4", "5,6,7,8,9"],
          [
              ",".join(x for x in column_names),
              "10,11,12,13,14",
              "15,16,17,18,19",
          ],
      ]
      filenames = self._setup_files(inputs)
  
      # Duplicate column names
      with self.assertRaises(ValueError):
          self._make_csv_dataset(
              filenames,
              batch_size=1,
              column_defaults=record_defaults,
              label_name="col0",
              column_names=column_names * 2,
          )
  
      # Label key not one of column names
      with self.assertRaises(ValueError):
          self._make_csv_dataset(
              filenames,
              batch_size=1,
              column_defaults=record_defaults,
              label_name="not_a_real_label",
              column_names=column_names,
          )
  
imports: import gzip
  import os
  import zlib
  from absl.testing import parameterized
  import numpy
  from tensorflow.python.data.experimental.ops import readers
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.util import nest
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.platform import test
label_desc: Use image node_id 11 for calling the MakeCsvDatasetTest obj's underlying member method code with example usage: obj.testWithBadInputs() without return types