code: def test_dataset_registry_list_builders():
      register1 = mock.create_autospec(register_path.DataDirRegister)
      register1.list_builders.return_value = ["a", "b"]
      register2 = mock.create_autospec(register_package.PackageRegister)
      register2.list_builders.return_value = ["c"]
      namespace_config = mock.create_autospec(
          registry_lib.NamespaceConfig
      )
      namespace_config.registers_per_namespace.return_value = {
          "ns1": [register1],
          "ns2": [register2],
      }
      registry = registry_lib.DatasetRegistry(
          namespace_config=namespace_config
      )
      assert set(registry.list_namespaces()) == {"ns1", "ns2"}
      assert set(registry.list_builders()) == {"a", "b", "c"}
  
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 8 for calling a global function with example usage: test_dataset_registry_list_builders() without return types