@classmethod
def unpack_scalar(cls, dataset, data):
    """
        Given a dataset object and data in the appropriate format for
        the interface, return a simple scalar.
        """
    if len(data.data_vars) == 1 and len(data[dataset.vdims[0].name].shape
        ) == 0:
        return data[dataset.vdims[0].name].item()
    return data
