change on line number 20.

changed
    def _task_by_id(self, id):
        return self._tasks_by_id(id - 1)
to :
    def _task_by_id(self, id):
        return self._tasks_by_id[id - 1]