def get_data(dataset):
    """Get features and targets from a specific dataset.

    Parameters
    ----------
    dataset : Dataset object
        dataset that can provide features and targets

    Returns
    -------
    features : arrary
        features in the dataset
    targets : array
        1-d targets in the dataset
    """
    handle = dataset.open()
    data = dataset.get_data(handle, slice(0, dataset.num_examples))
    features = data[0]
    targets = data[1]
    dataset.close(handle)

    return features, targets