def _parse_error_message(self, message):
        """Parses the eAPI failure response message

        This method accepts an eAPI failure message and parses the necesary
        parts in order to generate a CommandError.

        Args:
            message (str): The error message to parse

        Returns:
            tuple: A tuple that consists of the following:
                * code: The error code specified in the failure message
                * message: The error text specified in the failure message
                * error: The error text from the command that generated the
                    error (the last command that ran)
                * output: A list of all output from all commands
        """
        msg = message['error']['message']
        code = message['error']['code']

        err = None
        out = None

        if message['error'] in 'data':
            err = ' '.join(message['error']['data'][-1]['errors'])
            out = message['error']['data']

        return (code, msg, err, out)
dataset/ETHPy150Open arista-eosplus/pyeapi/pyeapi/eapilib.py/EapiConnection._parse_error_message/swapped operands of `in`