code: def lang_pair_dataset(lengths: Sequence[int]) -> LanguagePairDataset:
      tokens = [[i] * l for i, l in enumerate(lengths)]
      return LanguagePairDataset(
          ListDataset(tokens), lengths, mock_dict()
      )
  
file_path: fairseq/tests/test_dataset.py
imports: import logging
  import unittest
  from typing import Sequence
  from fairseq.data import LanguagePairDataset, ListDataset, RoundRobinZipDatasets
  from tests.test_train import mock_dict
label_desc: Use image node_id 1 for calling a global function with example usage: lang_pair_dataset(lengths) and returns: LanguagePairDataset