<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def perform(self):
 """ Performs all stored actions. """

        if self._driver.w3c:
            self.w3c_actions.perform()
        else:
            for action in self._actions:
                action()