code: def test_register_builder(
      dummy_register,
  ):  # pylint: disable=redefined-outer-name
      builder = dummy_register.builder(naming.DatasetName("kaggle:ds0"))
      assert "kaggle" in builder.data_path.parts
  
      # Same dataset name can be loaded from different namespace
      builder = dummy_register.builder(naming.DatasetName("mlds:ds0"))
      assert "mlds" in builder.data_path.parts
  
      builder = dummy_register.builder(
          naming.DatasetName("mlds:ds0"),
          data_dir=None,  # data_dir can be passed only if None
          version="1.0.0",
      )
      assert "mlds" in builder.data_path.parts
  
      with pytest.raises(
          ValueError, match="`data_dir` cannot be set for"
      ):
          dummy_register.builder(
              naming.DatasetName("mlds:ds0"),
              data_dir="/path/to/data_dir",
          )
  
      with pytest.raises(
          registered.DatasetNotFoundError,
          match="Namespace .* not found.",
      ):
          dummy_register.builder(
              naming.DatasetName("non-existing-namespace:ds0")
          )
  
      with pytest.raises(registered.DatasetNotFoundError):
          dummy_register.builder(naming.DatasetName("other:ds0"))
  
imports: import os
  import pathlib
  import tempfile
  import textwrap
  from unittest import mock
  import pytest
  from tensorflow_datasets import testing
  from tensorflow_datasets.core import naming
  from tensorflow_datasets.core import registered
  from tensorflow_datasets.core.community import register_package
  from tensorflow_datasets.core.community import register_path
  from tensorflow_datasets.core.community import registry
  from tensorflow_datasets.core.utils import gcs_utils
label_desc: Use image node_id 2 for calling a global function with example usage: test_register_builder(dummy_register) without return types