<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def refresh_actions(self):
 """ Create options menu. """

        self.options_menu.clear()

        # Decide what additional actions to show
        if self.undocked_window is None:
            additional_actions = [MENU_SEPARATOR,
                                  self.undock_action,
                                  self.close_plugin_action]
        else:
            additional_actions = [MENU_SEPARATOR,
                                  self.dock_action]

        # Create actions list
        self.plugin_actions = self.get_plugin_actions() + additional_actions
        add_actions(self.options_menu, self.plugin_actions)