How do i use "wait until" element before certain page is displayed? (using python 3.7)

Hi guys,
First of all, i am a newbie in testing app using appium (python 3.7). Here, i am testing an app where i have to wait right after login process is completed. I have done this using implicit wait. But now, to make the testing process more dynamic i want to wait until the next page is displayed.

Note: I have seen and tried several issues of this forum but could not help myself.

Here’s the code,

from appium import webdriver
from selenium.webdriver.support.ui import WebDriverWait

desired_cap = {
“platformName”: “Android”,
“deviceName”: “QDG9X18426W11577”,
“newCommandTimeout”: “240”,
“app”: “C:\Users\tahmina\Downloads\test.apk”,
“appPackage”: “com.cloudapper.android”,
“appActivity”: “com.cloudapper.android.SplashActivity”
}
#Making connection with Appium server
driver = webdriver.Remote(“http://localhost:4723/wd/hub”, desired_cap)

#Here i have used implicit wait to load the login page
driver.implicitly_wait(20)

#Login to the app
search_element = driver.find_element_by_id(‘Username’).send_keys(‘test email address’)
search_element = driver.find_element_by_id(‘Password’).send_keys(‘test password’)
search_element = driver.find_element_by_xpath(
‘/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout[2]/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[2]/android.widget.Button’).click()

wait = WebDriverWait(driver, 10)
#Waiting until the next process comes up
if webdriver.wait.until(driver.find_element_by_id(‘com.cloudapper.android:id/item_bg’).is_displayed()):
print(‘Run the next process’)
elif webdriver.wait.until(not driver.find_element_by_id(‘com.cloudapper.android:id/item_bg’)):
print(‘Something went wrong!’)

#Searching employee by using ID
search_element = driver.find_element_by_id(‘com.cloudapper.android:id/edtSearch’).send_keys(‘1018’)
driver.execute_script(‘mobile:performEditorAction’, {‘action’: ‘search’})

Guide me if anyone of you have any solution.