export default (configuration) => {
    //TODO: what does this do?
    return `
  package ${configuration.packageName}.network
  
  
  import com.google.gson.Gson
  import com.google.gson.reflect.TypeToken
  import ${configuration.packageName}.model.*
  import ${configuration.packageName}.model.remote.*
  import okhttp3.MultipartBody
  import org.koin.dsl.module
  import retrofit2.Response
  import retrofit2.http.Body
  import retrofit2.http.POST
  import retrofit2.http.PUT
  import android.util.Log.e
  
  abstract class BaseDataSource {
    protected suspend fun <T> getResult(call: suspend () -> Response<T>): Resource<T> {
        try {
            val response = call()
            val body = response.body()
            if (response.isSuccessful) {
                if (body != null) return Resource.success(body)
            } else {
                val gson = Gson()
                val type = object : TypeToken<MessageResponse>() {}.type
                val errorResponse: MessageResponse? =
                    gson.fromJson(response.errorBody()!!.charStream(), type)
                return Resource.error(errorResponse?.message, body, response.code())
            }
        } catch (e: Exception) {
            e("err", e.message, e)
            return Resource.error(e.message ?: e.toString(), null, 429)
        }
        return Resource.error(null, null, 429)
    }
  }
  
  
    `;
  };
  
  