def encode_action_dstc(self, actions, system=True):
        """
        Endoce the dialogue actions - specific for DSTC2

        :param actions:
        :param system:
        :return:
        """
        if not actions:
            print('WARNING: Parse DSTC2 action encoding called with empty '
                  'actions list (returning 0).')
            return 0

        # TODO: Handle multiple actions
        action = actions[0]

        if self.dstc2_acts and action.intent in self.dstc2_acts:
            return self.dstc2_acts.index(action.intent)

        if action.intent == 'request':
            if system and \
                    action.params[0].slot in self.system_requestable_slots:
                return len(self.dstc2_acts) + \
                       self.system_requestable_slots.index(
                           action.params[0].slot)

            elif action.params[0].slot in self.requestable_slots:
                return len(self.dstc2_acts) + \
                       self.requestable_slots.index(action.params[0].slot)

        if action.intent == 'inform' and \
                action.params[0].slot in self.requestable_slots:
            if system:
                return len(self.dstc2_acts) + \
                       len(self.system_requestable_slots) + \
                       self.requestable_slots.index(action.params[0].slot)

            else:
                return len(self.dstc2_acts) + \
                       len(self.requestable_slots) + \
                       self.requestable_slots.index(action.params[0].slot)

        # Default fall-back action
        print('Parse DSTC2 action encoder warning: Selecting default action '
              '(unable to encode: {0})!'.format(action))
        return 0

        Endoce the dialogue actions - specific for DSTC2

        :param actions:
        :param system:
        :return:
        
plato/utilities/parser/parse_dstc2.py