'Process data from an iterator to a format that can be provided to client.'

def process_data(self, iterator, start_val=0, max_vals=None, **kwargs):

    filter_cols = loads(kwargs.get('filter_cols', '[]'))
    no_detail = ('no_detail' in kwargs)
    results = []
    message = None
    for (count, (feature, offset)) in enumerate(iterator):
        if (count < start_val):
            continue
        if ((count - start_val) >= max_vals):
            message = (self.error_max_vals % (max_vals, 'reads'))
            break
        payload = package_gff_feature(feature, no_detail=no_detail, filter_cols=filter_cols)
        payload.insert(0, offset)
        results.append(payload)
    return {'data': results, 'dataset_type': self.dataset_type, 'message': message}
