def error(message, level="error", exit_code=1, **kwargs):
    kwargs["fg"] = kwargs.get("fg", "red")
    click.secho(u"error: {}".format(message), **kwargs)
    sys.exit(exit_code)
def values(cls, dataset, dim, expanded=True, flat=True, compute=True,
               keep_index=False):
        dim = dataset.get_dimension(dim, strict=True)
        data = dataset.data[dim.name]
        if not expanded:
            data = data.unique()
            return data.values_host if compute else data.values
        elif keep_index:
            return data
        elif compute:
            return data.values_host
        try:
            return data.values
        except Exception:
            return data.values_host