Appium Python android swipe till last list element

Hi everyone!
I have an android app where I have to scroll till last list element. it’s a dynamic list and no one can sure that how many list item will be there. I can scroll till the last list item
using coordinates

Now I want to stop the automation when the last list item is visible