class_docstr: Dataset register based on generated `data_dir` paths.
  
  Usage:
  
  ```python
  register = DataDirRegister(namespace_to_data_dirs=
    {'my_namespace': [epath.Path('/path/to/namespaces.toml')]})
  
  # List all registered datasets: ['kaggle:ds0', 'kaggle:ds1',...]
  register.list_builders()
  
  # Load a specific dataset
  builder = register.builder('tensorflow_graphics:shapenet')
  ```
class_docstr_tok: ["Dataset","register","based","on","generated","`","data_dir","`","paths",".","Usage",":","``","`","python","register","=","DataDirRegister","(","namespace_to_data_dirs=","{","'my_namespace","'",":","[","epath.Path","(","'\/path\/to\/namespaces.toml","'",")","]","}",")","#","List","all","registered","datasets",":","[","'kaggle",":","ds0","'",",","'kaggle",":","ds1","'",",","...","]","register.list_builders","(",")","#","Load","a","specific","dataset","builder","=","register.builder","(","'tensorflow_graphics",":","shapenet","'",")","``","`"]
docstr: Returns the dataset builder.
docstr_tok: ["Returns","the","dataset","builder","."]
code: def builder(
      self,
      name: naming.DatasetName,
      **builder_kwargs: Any,
  ) -> dataset_builder.DatasetBuilder:
      """Returns the dataset builder."""
      data_dir = builder_kwargs.pop("data_dir", None)
      if data_dir:
          raise ValueError(
              "`data_dir` cannot be set for data_dir-based community datasets. "
              f"Dataset should already be generated. Got: {data_dir}"
          )
      if name.namespace is None:
          raise AssertionError(f"No namespace found: {name}")
      if (
          name.namespace not in self._ns2data_dir
      ):  # pylint: disable=unsupported-membership-test
          close_matches = difflib.get_close_matches(
              name.namespace, self._ns2data_dir, n=1
          )
          hint = (
              f"\nDid you mean: {close_matches[0]}"
              if close_matches
              else ""
          )
          error_msg = (
              f"Namespace `{name.namespace}` for `{name}` not found. "
              f"Should be one of {sorted(self._ns2data_dir)}{hint}"
          )
          raise KeyError(error_msg)
      return read_only_builder.builder_from_files(
          name.name,
          data_dir=[
              os.fspath(path)
              for path in self._ns2data_dir[name.namespace]
          ],
          **builder_kwargs,
      )
  
imports: import concurrent.futures
  import difflib
  import functools
  import os
  from typing import Any, Dict, FrozenSet, Iterable, Iterator, List, Type
  from absl import flags
  from absl import logging
  from etils import epath
  from tensorflow_datasets.core import dataset_builder
  from tensorflow_datasets.core import naming
  from tensorflow_datasets.core import read_only_builder
  from tensorflow_datasets.core import registered
  from tensorflow_datasets.core.community import register_base
  from tensorflow_datasets.core.utils import file_utils
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
label_desc: Use image node_id 6 for calling the DataDirRegister obj's underlying member method code with example usage: obj.builder(name) and returns: read_only_builder