class_docstr: Tests for TranslateFolder functions.
code: def test_properties(self):
      file_contents = {
          "root_dir/lang1.train.txt": "line1\nlang1",
          "root_dir/lang2.train.txt": "line1\nlang2",
          "root_dir/lang3.train.txt": "line1\nlang3",
          "root_dir/lang1.val.txt": "line1\nline2\n\nline4",
          "root_dir/lang2.val.txt": "line1\nline2\n\nline4",
          "root_dir/lang3.val.txt": "line1\nline2\n\nline4",
          "root_dir/lang1.test.txt": "line1",
          "root_dir/lang2.test.txt": "line1",
      }
  
      with tfds.testing.MockFs() as fs:
          for file in file_contents:
              fs.add_file(file, file_contents[file])
  
          (
              split_examples,
              langs,
          ) = translate_folder._get_split_language_examples("root_dir")
          builder = tfds.TranslateFolder(root_dir="root_dir")
  
          self.assertEqual(
              split_examples,
              {
                  "train": {
                      "lang1": ["line1", "lang1"],
                      "lang2": ["line1", "lang2"],
                      "lang3": ["line1", "lang3"],
                  },
                  "val": {
                      "lang1": ["line1", "line2", "", "line4"],
                      "lang2": ["line1", "line2", "", "line4"],
                      "lang3": ["line1", "line2", "", "line4"],
                  },
                  "test": {
                      "lang1": ["line1"],
                      "lang2": ["line1"],
                  },
              },
          )
  
          self.assertEqual(builder.info.splits["train"].num_examples, 2)
          self.assertEqual(builder.info.splits["val"].num_examples, 4)
          self.assertEqual(builder.info.splits["test"].num_examples, 1)
  
          expected_languages = [
              "lang1",
              "lang2",
              "lang3",
          ]
  
          self.assertEqual(expected_languages, langs)
          self.assertEqual(
              list(builder.info.features.keys()), expected_languages
          )
  
file_path: datasets/tensorflow_datasets/core/folder_dataset/translate_folder_test.py
imports: import os
  from unittest import mock
  from tensorflow_datasets.core.folder_dataset import translate_folder
  import tensorflow_datasets.public_api
label_desc: Use image node_id 1 for calling the TranslateFolderFunctionTest obj's underlying member method code with example usage: obj.test_properties() without return types