class_docstr: Test to read data from LIT JSONL format.
class_docstr_tok: ["Test","to","read","data","from","LIT","JSONL","format","."]
code: def setUp(self):
      super().setUp()
  
      self.data_spec = {
          "parity": lit_types.CategoryLabel(vocab=["odd", "even"]),
          "text": lit_types.TextSegment(),
          "value": lit_types.Integer(),
          "other_divisors": lit_types.SparseMultilabel(),
          "in_spanish": lit_types.TextSegment(),
          "embedding": lit_types.Embeddings(),
      }
  
      self.sample_examples = [
          {
              "parity": "odd",
              "text": "One",
              "value": 1,
              "other_divisors": [],
              "in_spanish": "Uno",
          },
          {
              "parity": "even",
              "text": "Two",
              "value": 2,
              "other_divisors": [],
              "in_spanish": "Dos",
          },
          {
              "parity": "odd",
              "text": "Three",
              "value": 3,
              "other_divisors": [],
              "in_spanish": "Tres",
          },
          {
              "parity": "even",
              "text": "Four",
              "value": 4,
              "other_divisors": ["Two"],
              "in_spanish": "Cuatro",
          },
          {
              "parity": "odd",
              "text": "Five",
              "value": 5,
              "other_divisors": [],
              "in_spanish": "Cinco",
          },
          {
              "parity": "even",
              "text": "Six",
              "value": 6,
              "other_divisors": ["Two", "Three"],
              "in_spanish": "Seis",
          },
          {
              "parity": "odd",
              "text": "Seven",
              "value": 7,
              "other_divisors": [],
              "in_spanish": "Siete",
          },
          {
              "parity": "even",
              "text": "Eight",
              "value": 8,
              "other_divisors": ["Two", "Four"],
              "in_spanish": "Ocho",
          },
          {
              "parity": "odd",
              "text": "Nine",
              "value": 9,
              "other_divisors": ["Three"],
              "in_spanish": "Nueve",
          },
          {
              "parity": "even",
              "text": "Ten",
              "value": 10,
              "other_divisors": ["Two", "Five"],
              "in_spanish": "Diez",
          },
      ]
      # Add embeddings
      rand = np.random.RandomState(42)
      for ex in self.sample_examples:
          vec = rand.normal(0, 1, size=16)
          # Scale such that norm = value, for testing
          scaled = ex["value"] * vec / np.linalg.norm(vec)
          rounded = np.round(scaled, decimals=8)
          # Convert to regular list to avoid issues with assertEqual not correctly
          # handling NumPy array equality.
          ex["embedding"] = rounded.tolist()
  
      # Index data
      self.indexed_dataset = lit_dataset.IndexedDataset(
          spec=self.data_spec,
          examples=self.sample_examples,
      )
  
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 1 for calling the DatasetLoadingTest obj's underlying member method code with example usage: obj.setUp() without return types