def _data_loader(data_type, name=None):
    """Loads data from LittleChef's kitchen"""
    current_dir = os.getcwd()
    os.chdir(KITCHEN_DIR)
    try:
        func = getattr(lib, "get_" + data_type)
        if name:
            data = func(name)
        else:
            data = func()
    except __HOLE__ as e:
        log.error(e)
        raise RepoError('Error while loading {0} files. Possibly a JSON '
                        'syntax error'.format(data_type))
    else:
        return data
    finally:
        os.chdir(current_dir)
dataset/ETHPy150Open edelight/kitchen/kitchen/backends/lchef.py/_data_loader