def METHOD_NAME(setup_db_for_xpub_tests):
    db, xpub1, xpub2, xpub3, _ = setup_db_for_xpub_tests
    with db.conn.read_ctx() as cursor:
        receiving_idx, change_idx = db.get_last_consecutive_xpub_derived_indices(cursor, xpub1)
        assert receiving_idx == 1
        assert change_idx == 0
        receiving_idx, change_idx = db.get_last_consecutive_xpub_derived_indices(cursor, xpub2)
        assert receiving_idx == 0
        assert change_idx == 3
        receiving_idx, change_idx = db.get_last_consecutive_xpub_derived_indices(cursor, xpub3)
        assert receiving_idx == 0
        assert change_idx == 0