def convert_dataset(dataset, array, weights=None):
    """
    dataset: only used to get the class in which array/weights will be
    converted.
    """
    if 'zfit' in str(dataset.__class__):
        import zfit
        obs = dataset.obs
        converter = zfit.data.Data.from_numpy
        ret = converter(obs=obs, array=array, weights=weights)
        return ret
    else:
        raise NotImplementedError
