def METHOD_NAME(self, dataset_dir, dataset_type=None):
    dataset_dir = abspath(dataset_dir)
    if dataset_type is None:
        dataset_type = 'Dataset'
    if dataset_type == 'Dataset':
        ds_cfg = self._make_custom_dataset_config(dataset_dir)
        # For custom datasets, we reset the existing dataset configs
        self.update(ds_cfg)
    elif dataset_type == '_dummy':
        # XXX: A special dataset type to tease PaddleRec val dataset checkers
        self.update({
            'val_dataset': {
                'type': 'Dataset',
                'dataset_root': dataset_dir,
                'val_path': os.path.join(dataset_dir, 'val.txt'),
                'mode': 'val'
            },
        })
    else:
        raise ValueError(f"{dataset_type} is not supported.")