This returns a list of dictionaries with the actions got in the
        raw_set.
        :raw_set: is the dict representing a set of rules and conditions.
977578
def _get_sorted_actions_list(self, raw_set):
        
        keys_list = raw_set.keys()
        # actions_dicts_l is the final list which will contain the the
        # dictionaries with the actions.
        # The dictionaries will be sorted by the index obtained in the
        # template.
        actions_dicts_l = []
        # a_count is a counter which is incremented every time a new action is
        # added to the list, so we can give it a index.
        a_count = 0
        # actions_list will contain the keys starting with 'action-' but sorted
        # by their index
        actions_list = self._get_sorted_action_keys(keys_list)
        for key in actions_list:
            # Getting the key for otherWS element
            otherWS_key = 'otherWS-'+str(a_count)
            # Getting the value for otherWS selector
            otherWS = raw_set.get(otherWS_key, '')
            # Getting the key for analyst element
            analyst_key = 'analyst-'+str(a_count)
            # Getting the value for analyst
            analyst = raw_set.get(analyst_key, '')
            # Getting which analysis should has its result set
            setresulton_key = 'setresulton-'+str(a_count)
            setresulton = raw_set.get(setresulton_key, '')
            # Getting the discrete result to set
            setresultdiscrete_key = 'setresultdiscrete-'+str(a_count)
            setresultdiscrete = raw_set.get(setresultdiscrete_key, '')
            # Getting the numeric result to set
            setresultvalue_key = 'setresultvalue-'+str(a_count)
            setresultvalue = raw_set.get(setresultvalue_key, '')
            # Getting the local analysis id
            local_id_key = 'an_result_id-'+str(a_count)
            local_id = raw_set.get(local_id_key, '')
            # Getting the local analysis id
            worksheettemplate_key = 'worksheettemplate-'+str(a_count)
            worksheettemplate = raw_set.get(worksheettemplate_key, '')
            # Getting the visibility in report
            showinreport_key = 'showinreport-'+str(a_count)
            showinreport = raw_set.get(showinreport_key, '')
            # Getting the analysis to show or hide in report
            setvisibilityof_key = 'setvisibilityof-'+str(a_count)
            setvisibilityof = raw_set.get(setvisibilityof_key, '')
            # Building the action dict
            action_dict = {
                'action': raw_set[key],
                'act_row_idx': a_count,
                'otherWS': otherWS,
                'worksheettemplate': worksheettemplate,
                'analyst': analyst,
                'setresulton': setresulton,
                'setresultdiscrete': setresultdiscrete,
                'setresultvalue': setresultvalue,
                'an_result_id': local_id,
                'showinreport': showinreport,
                'setvisibilityof': setvisibilityof,
                }
            # Saves the action as a new dict inside the actions list
            actions_dicts_l.append(action_dict)
            a_count += 1
        return actions_dicts_l
952395
public function rawObjectActions()
    {
        if ($this->objectActions === null) {
            $parsed = $this->parsedObjectActions;

            $collectionConfig = $this->collectionConfig();
            if (isset($collectionConfig['object_actions'])) {
                $actions = $collectionConfig['object_actions'];
            } else {
                $actions = [];
            }

            $this->setObjectActions($actions);

            $this->parsedObjectActions = $parsed;
        }

        if ($this->parsedObjectActions === false) {
            $this->parsedObjectActions = true;
            $this->objectActions = $this->createObjectActions($this->objectActions);
        }

        return $this->objectActions;
    }
338154
def _serialize_rules(rules):
    
    result = [(rule_name, str(rule)) for rule_name, rule in rules.items()]
    return sorted(result, key=lambda rule: rule[0])
795646
def _sorted_actions(self):
        
        for a in filter(lambda _: not _.last and \
                        not self.is_action(_, 'parsers'), self._actions):
            yield a
        for a in filter(lambda _: _.last and \
                        not self.is_action(_, 'parsers'), self._actions):
            yield a
        for a in filter(lambda _: self.is_action(_, 'parsers'),
                        self._actions):
            yield a
350510
def properties(self):
        
        properties = defaultdict(list)
        for pattern in self.patterns:
            for key, values in pattern.properties.items():
                extend_safe(properties[key], values)
        for rule in self.rules:
            for key, values in rule.properties.items():
                extend_safe(properties[key], values)
        return properties
32547
def all_possible_actions(self) -> List[str]:
        
        all_actions = set()
        for _, action_list in self.valid_actions.items():
            for action in action_list:
                all_actions.add(action)
        return sorted(all_actions)
1021479
def process_raw(self, raw: str) -> None:
        
        raw_params = dict(group.split('=', 1) for group in raw.splitlines())

        super().process_raw(raw_params)
829228
def wildcard_allowed_actions(self, pattern=None):
        

        wildcard_allowed = []

        for statement in self.statements:
            if statement.wildcard_actions(pattern) and statement.effect == "Allow":
                wildcard_allowed.append(statement)

        return wildcard_allowed
845686
def to_dict(self):
        """"""
        raw_conditions = []
        for condition in self.conditions:
            if isinstance(condition, (Condition, Group)):
                raw_conditions.append(condition.to_dict())
            else:
                raw_conditions.append(condition)
        return {self.operator: raw_conditions}
426560
def get_workflows() -> dict:
    
    keys = DB.get_keys("workflow_definitions:*")
    known_workflows = dict()
    for key in keys:
        values = key.split(':')
        if values[1] not in known_workflows:
            known_workflows[values[1]] = list()
        known_workflows[values[1]].append(values[2])

    return known_workflows
393041
def as_dictionary(self):
        
        condition_dict = {
            "name": self.name,
            "timelock": self.timelock,
            "timeout": self.timeout,
            "contractName": self.contract_name,
            "functionName": self.function_name,
            "events": [e.as_dictionary() for e in self.events],
            "parameters": [p.as_dictionary() for p in self.parameters],
        }

        return condition_dict
508016
def dataset(self):
        '''
        
        '''
        target = self.db.target_table
        db_examples = self.db.rows(target, [self.db.target_att, self.db.pkeys[target]])

        examples = []
        for cls, pk in sorted(db_examples, key=lambda ex: ex[0]):
            facts = self._facts(pk, self.db.pkeys[target], target, visited=set())
            examples.append('%s %s' % (cls, ', '.join(facts)))

        return '\n'.join(examples)
648124
def get_raw_import_values(self):  # pragma: no cover, never used
        
        res = {}
        properties = list(self.__class__.properties.keys())
        # Register is not by default in the properties
        if 'register' not in properties:
            properties.append('register')

        for prop in properties:
            if hasattr(self, prop):
                val = getattr(self, prop)
                res[prop] = val
        return res
867032
def as_dict(self):
        
        drepr = {
            'blocks': [
                block.as_dict() for block in self if block.hidden == False
            ],
            'args': list(self.needed_inputs())
        }
        return drepr
538812
def raw_update(self, attributes=None):
        
        if attributes is None:
            attributes = {}

        if self._query is not None:
            return self._query.update(attributes)
339744
def _unpack_actions(raw):
    '''
    
    '''
    actions = []

    while len(raw) > 0:
        atype, alen = struct.unpack('!HH', raw[:4])
        atype = OpenflowActionType(atype)
        action = _ActionClassMap.get(atype)()
        action.from_bytes(raw[:alen])
        raw = raw[alen:]
        actions.append(action)
    return actions
1204034
def get_rulesets():
    "
    rulesets_dirs = get_ruleset_dirs()
    ruleset_files = []
    for rulesets_dir in rulesets_dirs:
        for f in os.listdir(rulesets_dir):
            for ext in EXTS:
                file_path = os.path.join(rulesets_dir, f)
                if os.path.isfile(file_path) and f.lower().endswith(ext):
                    ruleset_files.append((f[:-len(ext)], file_path))
    return ruleset_files