code: def _build_dataset_config(self, config):
      dataset = config.get("dataset", None)
      datasets = config.get("datasets", None)
  
      if dataset is None and datasets is None:
          raise KeyError(
              "Required argument 'dataset|datasets' not passed"
          )
  
      if datasets is None:
          config.datasets = dataset
          datasets = dataset.split(",")
      else:
          datasets = datasets.split(",")
  
      dataset_config = OmegaConf.create()
  
      for dataset in datasets:
          builder_cls = registry.get_builder_class(dataset)
  
          if builder_cls is None:
              warning = (
                  f"No dataset named '{dataset}' has been registered"
              )
              warnings.warn(warning)
              continue
          default_dataset_config_path = builder_cls.config_path()
  
          if default_dataset_config_path is None:
              warning = (
                  f"Dataset {dataset}'s builder class has no default configuration "
                  + "provided"
              )
              warnings.warn(warning)
              continue
  
          dataset_config = OmegaConf.merge(
              dataset_config, load_yaml(default_dataset_config_path)
          )
  
      return dataset_config
  
imports: import collections
  import json
  import logging
  import os
  import warnings
  from ast import literal_eval
  from typing import List
  import torch
  from mmf.common.registry import registry
  from mmf.utils.env import import_user_module
  from mmf.utils.file_io import PathManager
  from mmf.utils.general import get_absolute_path, get_mmf_root
  from omegaconf import DictConfig, errors, OmegaConf
label_desc: Use image node_id 8 for calling the Configuration obj's underlying member method code with example usage: obj._build_dataset_config(config) and returns: dataset_config