def check_async_command_status(self, request_identifiers):

        lab_session_id = self._reservation_session.get('lab_session_id')
        lab_coordaddr  = self._reservation_session.get('lab_coordaddr')

        if lab_session_id is None or lab_coordaddr is None:
            raise core_exc.NoCurrentReservationError("check_async_command called but no current reservation")



        try:
            laboratory_server = self._locator[lab_coordaddr]
            response = laboratory_server.check_async_command_status( lab_session_id, request_identifiers)

            # Within the response map, we might now have the real response to one
            # (or more) async commands. We will update the usage object of the
            # command with its response, so that once the experiment ends it appears
            # in the log as expected.
            for req_id, (cmd_status, cmd_response) in response.items(): #@UnusedVariable
                if(req_id in self._reservation_session["async_commands_ids"]):
                    #usage_obj_id = self._reservation_session["async_commands_ids"][req_id]
                    # TODO: Bug here. async_commands_ids is empty.
                    # self._update_command_or_file(usage_obj_id, cmd_response)
                    pass

            return response

        except LaboratoryErrors.SessionNotFoundInLaboratoryServerError:
            # We did not find the specified session in the laboratory server.
            # We'll finish the experiment.
            #self._update_command(command_id_pack, Command.Command("ERROR: SessionNotFound: None"))
            try:
                self.finish()
            except core_exc.FailedToFreeReservationError:
                pass
            raise core_exc.NoCurrentReservationError(
                'Experiment reservation expired'
            )
        except LaboratoryErrors.FailedToInteractError as ftspe:
            # There was an error while trying to send the command.
            # We'll finish the experiment.
            #self._update_command(command_id_pack, Command.Command("ERROR: " + str(ftspe)))
            try:
                self.finish()
            except core_exc.FailedToFreeReservationError:
                pass

            raise core_exc.FailedToInteractError(
                    "Failed to send command: %s" % ftspe
                )
Write a sequence of strings to the file.
dataset/ETHPy150Open weblabdeusto/weblabdeusto/server/src/weblab/core/reservation_processor.py/ReservationProcessor.check_async_command_status--crossover with--dataset/ETHPy150Open blynch/CloudMemeBackend/gridfs/grid_file.py/GridIn.writelines