def get_action(self, include=None, exclude=None):
        """
        Returns a list of actions filtered by specified inclusions
            or exclusions

        @param include: selectors to included
            if provided, filters the contained actions, including
                them if they start with any of the provided strings

        @param exclude: selectors to excluded
            if provided, filters the contained actions, excluding
                them if they start with any of the provided strings

        """

        include = include or ()
        exclude = exclude or ()
        return [
            action[1]
            for action in self.actions
            if (
                (
                    len(include) <= 0 or
                    self.is_starts_with(action[0], include)
                ) and (
                    len(exclude) <= 0 or
                    not self.is_starts_with(action[0], exclude)
                )
            )
        ]
dataset/ETHPy150Open spywhere/Javatar/core/action_history.py/_ActionHistory.get_action/original