<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def replace(self, p_todos):
 """ Replaces whole todolist with todo objects supplied as p_todos. """

        self.erase()
        self.add_todos(p_todos)
        self.dirty = True