def commit(self):
        if len(self.queue) == 0:
            return
        ret = self.sync(commands=self.queue)
        del self.queue[:]
        if 'TempIdMapping' in ret:
            for temp_id, new_id in ret['TempIdMapping'].items():
                self.temp_ids[temp_id] = new_id
                self._replace_temp_id(temp_id, new_id)
        if 'SyncStatus' in ret:
            return ret['SyncStatus']
        return ret

    # Authentication
Commits all requests that are queued.  Note that, without calling this
dataset/ETHPy150Open Doist/todoist-python/todoist/api.py/TodoistAPI.commit