<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):
 """Apply the rules of the context to its occurrences. This method executes all the functions defined in self.tasks in the order they are listed. Every function that acts as a context task receives the Context object itself as its only argument. The contextualized occurrences are then stored in Context.contextualized. The original Occurrence instances are not modified. """

        raw_operations = copy.deepcopy(self.occurrences)
        for task in self.tasks:
            task(self)
        self.occurrences = raw_operations