<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def apply(self, p_todolist, p_archive):
 """ Applies backup on supplied p_todolist. """

        if self.todolist and p_todolist:
            p_todolist.replace(self.todolist.todos())

        if self.archive and p_archive:
            p_archive.replace(self.archive.todos())