code: def test_build_files():
      # Make sure DummyDataset isn't registered by default
      with pytest.raises(tfds.core.registered.DatasetNotFoundError):
          _build("dummy_dataset")
  
      with pytest.raises(
          FileNotFoundError, match="Could not find .* script"
      ):
          _build("")
  
      # cd .../datasets/dummy_dataset && tfds build
      with mock_cwd(_DUMMY_DATASET_PATH):
          assert _build("") == ["dummy_dataset"]
  
      # cd .../datasets/dummy_dataset && tfds build dummy_dataset.py
      with mock_cwd(_DUMMY_DATASET_PATH):
          assert _build("dummy_dataset.py") == ["dummy_dataset"]
  
      # cd .../datasets/ && tfds build dummy_dataset
      with mock_cwd(_DUMMY_DATASET_PATH.parent):
          assert _build("dummy_dataset") == ["dummy_dataset"]
  
      # cd .../datasets/ && tfds build dummy_dataset --imports=xxx
      # --imports is passed. so do not load dataset from file
      with mock_cwd(_DUMMY_DATASET_PATH.parent):
          with pytest.raises(tfds.core.registered.DatasetNotFoundError):
              assert _build("dummy_dataset --imports=os")
  
      # cd .../datasets/ && tfds build dummy_dataset/dummy_dataset
      with mock_cwd(_DUMMY_DATASET_PATH.parent):
          assert _build("dummy_dataset/dummy_dataset") == [
              "dummy_dataset"
          ]
  
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 11 for calling a global function with example usage: test_build_files() without return types