class_docstr: Config what namespaces there are and where to find their datasets.
  
  The config file should be in `.toml` format and have the follow structure:
  
  ```toml
  [Namespaces]
  huggingface='github://huggingface/datasets/tree/master/datasets'
  kaggle=['/path/to/datasets/', '/path/to/more_datasets/']
  tensorflow_graphics='gs://tensorflow-graphics/datasets'
  ```
class_docstr_tok: ["Config","what","namespaces","there","are","and","where","to","find","their","datasets",".","The","config","file","should","be","in","`",".toml","`","format","and","have","the","follow","structure",":","``","`","toml","[","Namespaces","]","huggingface='github",":","\/\/huggingface\/datasets\/tree\/master\/datasets'","kaggle=","[","'\/path\/to\/datasets\/","'",",","'\/path\/to\/more_datasets\/","'","]","tensorflow_graphics='gs",":","\/\/tensorflow-graphics\/datasets'","``","`"]
docstr: Returns the registry containing all repositories in the given config.
  
  Raises:
    RuntimeError: when the config contains errors.
docstr_tok: ["Returns","the","registry","containing","all","repositories","in","the","given","config",".","Raises",":","RuntimeError",":","when","the","config","contains","errors","."]
code: def registers_per_namespace(
      self,
  ) -> Mapping[str, List[register_base.BaseRegister]]:
      """Returns the registry containing all repositories in the given config.
  
      Raises:
        RuntimeError: when the config contains errors.
      """
      config = toml.loads(self.config_path.read_text())
      registers_per_namespace = {}
      for namespace, path_or_paths in config["Namespaces"].items():
          if namespace in registers_per_namespace:
              raise RuntimeError(
                  f"Namespace {namespace} is defined twice in config"
                  f" {self.config_path}"
              )
          registers_per_namespace[namespace] = _load_register_for_paths(
              namespace=namespace, paths=_as_path_list(path_or_paths)
          )
      return registers_per_namespace
  
imports: import dataclasses
  import difflib
  import functools
  import os
  from typing import Any, Iterable, List, Mapping, Type
  from absl import logging
  from etils import epath
  from tensorflow_datasets.core import dataset_builder
  from tensorflow_datasets.core import github_api
  from tensorflow_datasets.core import naming
  from tensorflow_datasets.core import registered
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.community import register_base
  from tensorflow_datasets.core.community import register_package
  from tensorflow_datasets.core.community import register_path
  from tensorflow_datasets.core.utils import gcs_utils
  import toml
label_desc: Use image node_id 1 for calling the NamespaceConfig obj's underlying member method code with example usage: obj.registers_per_namespace() and returns: registers_per_namespace