def offset_limit(func):
    """
    Decorator that converts python slicing to offset and limit
    """

    def func_wrapper(self, start, stop):
        offset = start
        limit = stop - start
        return func(self, offset, limit)

    return func_wrapper