'To get a range of data for group ID=[1, 2, 3]:
>>> now = timezone.now()
>>> get_keys(TimeSeriesModel.group, [1, 2, 3],
>>>          start=now - timedelta(days=1),
>>>          end=now)'

def get_range(self, model, keys, start, end, rollup=None):

    (rollup, series) = self.get_optimal_rollup_series(start, end, rollup)
    series = map(to_datetime, series)
    results = []
    with self.cluster.map() as client:
        for key in keys:
            model_key = self.get_model_key(key)
            for timestamp in series:
                hash_key = self.make_counter_key(model, self.normalize_to_rollup(timestamp, rollup), model_key)
                results.append((to_timestamp(timestamp), key, client.hget(hash_key, model_key)))
    results_by_key = defaultdict(dict)
    for (epoch, key, count) in results:
        results_by_key[key][epoch] = int((count.value or 0))
    for (key, points) in six.iteritems(results_by_key):
        results_by_key[key] = sorted(points.items())
    return dict(results_by_key)
