Android: how to handle nested retrofit

this is part of code for retrofit2.9 in my repository class file:

   webService.provideModirfaniService()
            .getQuestions(imei, code)
            .enqueue(object : Callback<List<Question>> {

                override fun onResponse(
                    call: Call<List<Question>>,
                    response: Response<List<Question>>
                ) {
                    val statusCode = response.code()
                    val questionList = response.body()


                    if (response.isSuccessful) {
                        if (questionList != null) {
                            GlobalScope.launch(Dispatchers.IO) {
                                questionDao.insertOrUpdate(questionList)

                             

                                Log.d("amin", "before getLastVersion()")
                             
                                   getLastVersion()
                            
                              
                                Log.d("amin", "after getLastVersion()")

getLastVersion() function is another retrofit function. i need getLastVersion() to be done first and then the code continue. i mean this output:

before getLastVersion()
getlastVersion()
after getLastVersion

but when i run the code i have :

 before getLastVersion()
 after getLastVersion
 getlastVersion()