class Unionize(object):
    '''Abstract base class for unionize records.
    '''

    def __init__(self, *args, **kwargs):
        raise NotImplementedError()
        
        
    def calculate(self, *args, **kwargs):
        raise NotImplementedError()
        
        
    def propagate(self, ancestor, copy_all, *args, **kwargs):
        raise NotImplementedError()
        
        
    def output(self, *args, **kwargs):
        raise NotImplementedError()


    def slice_arrays(self, low, high, data_arrays):
        '''Extract a slice from several aligned arrays
        
        Parameters
        ----------
        low : int
            start of slice, inclusive
        high : int
            end of slice, exclusive
        data_arrays : dict
            keys are varieties of data. values are sorted, flattened 
            data arrays
        
        '''
    
        return {k: v[low:high] for k, v in data_arrays.iteritems()}
