def blockSize(self, imin, imax):
    try:
        return sum(self.cellSizes[imin:(imax + 1)])
    except IndexError:
        return (self.cellSizes * (imax - imin))
def blockSize(self, imin, imax):
    try:
        return sum(self.cellSizes[imin:(imax + 1)])
    except IndexError:
        return (self.cellSizes * (imax - imin))