code: def test_prase_file_format():
      assert (
          file_adapters.FileFormat.from_value("tfrecord")
          == file_adapters.FileFormat.TFRECORD
      )
      assert (
          file_adapters.FileFormat.from_value(
              file_adapters.FileFormat.TFRECORD
          )
          == file_adapters.FileFormat.TFRECORD
      )
      assert (
          file_adapters.FileFormat.from_value("riegeli")
          == file_adapters.FileFormat.RIEGELI
      )
      assert (
          file_adapters.FileFormat.from_value(
              file_adapters.FileFormat.RIEGELI
          )
          == file_adapters.FileFormat.RIEGELI
      )
      with pytest.raises(ValueError, match="is not a valid FileFormat"):
          file_adapters.FileFormat.from_value("i do not exist")
      assert (
          file_adapters.FileFormat.from_value("array_record")
          == file_adapters.FileFormat.ARRAY_RECORD
      )
      assert (
          file_adapters.FileFormat.from_value(
              file_adapters.FileFormat.ARRAY_RECORD
          )
          == file_adapters.FileFormat.ARRAY_RECORD
      )
      assert (
          file_adapters.FileFormat.from_value("parquet")
          == file_adapters.FileFormat.PARQUET
      )
      assert (
          file_adapters.FileFormat.from_value(
              file_adapters.FileFormat.PARQUET
          )
          == file_adapters.FileFormat.PARQUET
      )
  
file_path: datasets/tensorflow_datasets/core/file_adapters_test.py
imports: import pathlib
  from typing import Type
  import pytest
  from tensorflow_datasets import testing
  from tensorflow_datasets.core import dataset_builder
  from tensorflow_datasets.core import file_adapters
label_desc: Use image node_id 6 for calling a global function with example usage: test_prase_file_format() without return types