def process_GetExperimentStatus(self):
    if self.reservation_id is None:
        return "Reservation id not found in cookie"

    reservation_status = weblab_api.api.get_reservation_status()
    if reservation_status.status == "Reservation::waiting":
        length = reservation_status.position
        status = 1
    elif reservation_status.status == "Reservation::waiting_confirmation":
        length = 0
        status = 2
    elif reservation_status.status == "Reservation::post_reservation":
        length = 0
        status = 3
    else:
        raise Exception("Unexpected status in get_experimen_status: %s" % reservation_status.status)

    return """<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetExperimentStatusResponse xmlns="http://ilab.mit.edu">
<GetExperimentStatusResult>
<statusReport>
<statusCode>%s</statusCode>
<wait>
<effectiveQueueLength>%s</effectiveQueueLength>
<estWait>0</estWait>
</wait>
<estRuntime>0</estRuntime>
<estRemainingRuntime>0</estRemainingRuntime>
</statusReport>
<minTimetoLive>0</minTimetoLive>
</GetExperimentStatusResult>
</GetExperimentStatusResponse>
</soap:Body>
</soap:Envelope>""" % (status, length)
dataset/ETHPy150Open weblabdeusto/weblabdeusto/server/src/weblab/core/web/ilab.py/process_GetExperimentStatus/original