code: def testBasic(self, compression_type):
      test_filenames = self._createFiles(
          2, 5, crlf=True, compression_type=compression_type
      )
  
      def dataset_fn(filenames, num_epochs, batch_size=None):
          repeat_dataset = readers.TextLineDataset(
              filenames, compression_type=compression_type
          ).repeat(num_epochs)
          if batch_size:
              return repeat_dataset.batch(batch_size)
          return repeat_dataset
  
      # Basic test: read from file 0.
      expected_output = [self._lineText(0, i) for i in range(5)]
      self.assertDatasetProduces(
          dataset_fn([test_filenames[0]], 1),
          expected_output=expected_output,
      )
  
      # Basic test: read from file 1.
      self.assertDatasetProduces(
          dataset_fn([test_filenames[1]], 1),
          expected_output=[self._lineText(1, i) for i in range(5)],
      )
  
      # Basic test: read from both files.
      expected_output = [self._lineText(0, i) for i in range(5)]
      expected_output.extend(self._lineText(1, i) for i in range(5))
      self.assertDatasetProduces(
          dataset_fn(test_filenames, 1), expected_output=expected_output
      )
  
      # Test repeated iteration through both files.
      expected_output = [self._lineText(0, i) for i in range(5)]
      expected_output.extend(self._lineText(1, i) for i in range(5))
      self.assertDatasetProduces(
          dataset_fn(test_filenames, 10),
          expected_output=expected_output * 10,
      )
  
      # Test batched and repeated iteration through both files.
      self.assertDatasetProduces(
          dataset_fn(test_filenames, 10, 5),
          expected_output=[
              [self._lineText(0, i) for i in range(5)],
              [self._lineText(1, i) for i in range(5)],
          ]
          * 10,
      )
  
imports: import gzip
  import os
  import pathlib
  import zlib
  from absl.testing import parameterized
  from tensorflow.python.data.kernel_tests import checkpoint_test_base
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import options
  from tensorflow.python.data.ops import readers
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import errors
  from tensorflow.python.platform import test
  from tensorflow.python.util import compat
label_desc: Use image node_id 1 for calling the TextLineDatasetTest obj's underlying member method code with example usage: obj.testBasic(compression_type) and returns: repeat_dataset, repeat_dataset