def METHOD_NAME(self, session_id):
    self.check_session_id(session_id)
    if self._session_status_reqno < run_step:
        raise InvalidSessionState(
            "Requesting status of graph that is not running yet"
        )
    while True:
        l = self._status_file.readline()
        if not l:
            self._status_file.close()
            self._status = SessionStates.FINISHED
            return self._last_graph_status
        content = json.loads(l)
        this_session_id = content["ssid"]
        if this_session_id != session_id:
            continue
        graph_status = content["gs"]
        self._last_graph_status = graph_status
        logger.info("Serving graph status")
        return graph_status