class_docstr: Test to read data from LIT JSONL format.
class_docstr_tok: ["Test","to","read","data","from","LIT","JSONL","format","."]
code: def test_write_roundtrip_indexed(self):
      tempdir = self.create_tempdir()
      output_base = os.path.join(
          tempdir.full_path, "test_dataset.indexed.lit.jsonl"
      )
      lit_dataset.write_examples(
          self.indexed_dataset.indexed_examples, output_base
      )
      lit_dataset.write_spec(self.data_spec, output_base + ".spec")
  
      # Read back and compare contents
      ds = lit_dataset.load_lit_format(output_base)
      self.assertIsInstance(ds, lit_dataset.IndexedDataset)
      self.assertEqual(self.data_spec, ds.spec())
      self.assertEqual(
          self.indexed_dataset.indexed_examples, ds.indexed_examples
      )
      for original, loaded in zip(self.sample_examples, ds.examples):
          for key in self.indexed_dataset.spec().keys():
              self.assertEqual(original[key], loaded[key])
  
imports: import os
  import types
  from absl.testing import absltest
  from absl.testing import parameterized
  from lit_nlp.api import dataset
  from lit_nlp.api import types
  import numpy
label_desc: Use image node_id 6 for calling the DatasetLoadingTest obj's underlying member method code with example usage: obj.test_write_roundtrip_indexed() without return types