import os


DEFAULT_ROOT = './materials'


datasets_dt = {}
def register(name):
    def decorator(cls):
        datasets_dt[name] = cls
        return cls
    return decorator


def make(name, **kwargs):
    if kwargs.get('root_path') is None:
        kwargs['root_path'] = os.path.join(DEFAULT_ROOT, name)
    dataset = datasets_dt[name](**kwargs)
    return dataset


[((17, 30, 17, 62), 'os.path.join', 'os.path.join', ({(17, 43, 17, 55): 'DEFAULT_ROOT', (17, 57, 17, 61): 'name'}, {}), '(DEFAULT_ROOT, name)', False, 'import os\n')]