def _format_conditions_and_actions(self, raw_data):
        """
        This function gets a set of actions and conditionswith the following
        format:

         {'action-0': 'repeat',
          'action-1': 'repeat',
          'analysisservice-0': '30cd952b0bb04a05ac27b70ada7feab2',
          'analysisservice-1': '30cd952b0bb04a05ac27b70ada7feab2',
          'and_or-0': 'and',
          'and_or-1': 'no',
          'range0-0': '12',
          'range0-1': '31',
          'range1-0': '12',
          'range1-1': '33',
          'worksheettemplate-0': '70d48adfb34c4231a145f76a858e94cf',
          'setresulton-0': 'original',
          'setresulton-1': 'original',
          'trigger': 'submit',
          'value': '',
          'an_result_id-0':'rep-1',
          'an_result_id-1':'rep-2'}

        and returns a formatted set with the conditions and actions sorted
        like this one:
        {
        'conditions':[{
            'range1': 'X', 'range0': 'X',
            'cond_row_idx':'X'
            'and_or': 'and',
            'analysisservice': '<as_uid>',
            },
            {
            'range1': 'X', 'range0': 'X',
            'cond_row_idx':'X'
            'and_or': 'and',
            'analysisservice': '<as_uid>',
            }, {...}],
        'trigger': 'xxx',
        'actions':[
            {'action':'duplicate', 'act_row_idx':'0',
                'otherWS': to_another, 'analyst': 'sussan1',
                'setresultdiscrete': '1', 'setresultvalue': '2',
                'worksheettemplate-0': '70d48adfb34c4231a145f76a858e94cf',
                'setresulton': 'original','an_result_id-0':'rep-1'},
            {'action':'repeat', 'act_row_idx':'1',
                'otherWS': current, 'analyst': '', ...},
        ]
        }
        """
        keys = raw_data.keys()
        # 'formatted_action_row' is the dict which will be added in the
        # 'value' list
        formatted_set = {}
        # Filling the dict with the values that aren't actions or conditions
        formatted_set['trigger'] = raw_data.get('trigger', '')
        # Adding the conditions list to the final dictionary
        formatted_set['conditions'] = self._get_sorted_conditions_list(
            raw_data)
        # Adding the actions list to the final dictionary
        formatted_set['actions'] = self._get_sorted_actions_list(raw_data)
        return formatted_set