def get_import_root(client, title):
    try:
        top_pages = client.get_top_level_pages()
    except KeyError:
        top_pages = []
    for page in top_pages:
        if (isinstance(page, PageBlock) and (page.title == title)):
            logger.info(f"'{title}' page found")
            return page
    logger.info(f"Creating '{title}' page...")
    return client.current_space.add_page(title)
def get_import_root(client, title):
    try:
        top_pages = client.get_top_level_pages()
    except KeyError:
        top_pages = []
    for page in top_pages:
        if (isinstance(page, PageBlock) and (page.title == title)):
            logger.info(f"'{title}' page found")
            return page
    logger.info(f"Creating '{title}' page...")
    return client.current_space.add_page(title)