code: def test_new_outside_tfds(tmp_path: pathlib.Path):
      """Test adding a new dataset in an external repository."""
      _run_cli(f"new my_dataset --dir {str(tmp_path)}")
  
      filenames = [f.name for f in (tmp_path / "my_dataset").iterdir()]
      assert sorted(filenames) == [
          "CITATIONS.bib",
          "README.md",
          "TAGS.txt",
          "__init__.py",
          "checksums.tsv",
          "dummy_data",
          "my_dataset_dataset_builder.py",
          "my_dataset_dataset_builder_test.py",
      ]
  
      # If the dataset already exists, raise an error
      with pytest.raises(FileExistsError):
          _run_cli(f"new my_dataset --dir {str(tmp_path)}")
  
file_path: datasets/tensorflow_datasets/scripts/cli/new_test.py
imports: import pathlib
  import pytest
  from tensorflow_datasets.scripts.cli import main
  from tensorflow_datasets.scripts.cli import new
label_desc: Use image node_id 4 for calling a global function with example usage: test_new_outside_tfds(tmp_path) without return types