def METHOD_NAME(self, *args):
    slides, index = self.slides, self.index
    no_of_slides = len(slides) - 1
    if not slides:
        return
    x, y, width, height = self.x, self.y, self.width, self.height
    _offset, direction = self._offset, self.direction
    _prev, _next, _current = self._prev, self._next, self._current
    get_slide_container = self.get_slide_container
    last_slide = get_slide_container(slides[-1])
    first_slide = get_slide_container(slides[0])
    skip_next = False
    _loop = self.loop
    if direction[0] in ["r", "l"]:
        xoff = x + _offset
        x_prev = {"l": xoff + width, "r": xoff - width}
        x_next = {"l": xoff - width, "r": xoff + width}
        if _prev:
            _prev.pos = (x_prev[direction[0]], y)
        elif _loop and _next and index == 0:
            if (_offset > 0 and direction[0] == "r") or (
                _offset < 0 and direction[0] == "l"
            ):
                last_slide.pos = (x_prev[direction[0]], y)
                skip_next = True
        if _current:
            _current.pos = (xoff, y)
            if self._scrolling:
                self.dispatch("on_slide_progress", xoff)
        if skip_next:
            return
        if _next:
            _next.pos = (x_next[direction[0]], y)
        elif _loop and _prev and index == no_of_slides:
            if (_offset < 0 and direction[0] == "r") or (
                _offset > 0 and direction[0] == "l"
            ):
                first_slide.pos = (x_next[direction[0]], y)
    if direction[0] in ["t", "b"]:
        yoff = y + _offset
        y_prev = {"t": yoff - height, "b": yoff + height}
        y_next = {"t": yoff + height, "b": yoff - height}
        if _prev:
            _prev.pos = (x, y_prev[direction[0]])
        elif _loop and _next and index == 0:
            if (_offset > 0 and direction[0] == "t") or (
                _offset < 0 and direction[0] == "b"
            ):
                last_slide.pos = (x, y_prev[direction[0]])
                skip_next = True
        if _current:
            _current.pos = (x, yoff)
        if skip_next:
            return
        if _next:
            _next.pos = (x, y_next[direction[0]])
        elif _loop and _prev and index == no_of_slides:
            if (_offset < 0 and direction[0] == "t") or (
                _offset > 0 and direction[0] == "b"
            ):
                first_slide.pos = (x, y_next[direction[0]])