code: def test_build_dataset_configs():
      # By default, all configs are build
      assert _build("trivia_qa") == [
          "trivia_qa/rc",
          "trivia_qa/rc.nocontext",
          "trivia_qa/unfiltered",
          "trivia_qa/unfiltered.nocontext",
      ]
  
      # If config is set, only the defined config is generated
  
      # --config_idx
      assert _build("trivia_qa --config_idx=0") == ["trivia_qa/rc"]
  
      # --config
      assert _build("trivia_qa --config unfiltered.nocontext") == [
          "trivia_qa/unfiltered.nocontext",
      ]
  
      # --config Json
      config_json = '{"name":"my_config","description":"abcd"}'
      assert _build(f"imdb_reviews --config {config_json}") == [
          "imdb_reviews/my_config",
      ]
  
      # name/config
      assert _build("trivia_qa/unfiltered.nocontext") == [
          "trivia_qa/unfiltered.nocontext"
      ]
  
      with pytest.raises(
          ValueError, match="Config should only be defined once"
      ):
          _build("trivia_qa/unfiltered.nocontext --config_idx=0")
  
      with pytest.raises(
          ValueError, match="greater than number of configs"
      ):
          _build("trivia_qa --config_idx 100")
  
imports: import contextlib
  import os
  import pathlib
  from typing import Dict, Iterator, List, Optional
  from unittest import mock
  from absl.testing import parameterized
  from etils import epath
  import pytest
  import tensorflow_datasets
  from tensorflow_datasets import testing
  from tensorflow_datasets.core import download
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.utils import file_utils
  from tensorflow_datasets.scripts.cli import build
  from tensorflow_datasets.scripts.cli import main
label_desc: Use image node_id 7 for calling a global function with example usage: test_build_dataset_configs() without return types