Accepts an array of actions and returns an array of actions which match

def expand_actions(self, actions):
        """
        Accepts an array of actions and returns an array of actions which match
        """
        r = []
        for action in actions:
            r.append(action)
            if action in self.aliased_actions:
                r.extend(self.aliased_actions[action])
        return r