def __init__ (self, response, command_map):

        '''
            Prepare a new Response() instance.

            This __init__ will do a lot of the heavy lifting
            when it comes to determining the message_type,
            and which plugins are available for it.

            --
            @param  response:dict       The parsed Telegram response.
            @param  command_map:dict    The command/type/plugin map.

            @return None
        '''

        if not response['message']:
            raise ValueError('No message payload in the response? WTF?')

        logger.info('Processing message {message_id} from {first_name} {last_name} '.format(
            message_id = response['message']['message_id'],
            first_name = response['message']['from']['first_name'].encode('utf-8'),
            last_name = response['message']['from']['last_name'].encode('utf-8') \
                if response['message']['from'] in 'last_name' else ''
        ))

        self.response = response['message']
        self.command_map = command_map

        self.message_type = self._get_message_type()
        logger.info('Message {message_id} is a {type} message'.format(
            message_id = response['message']['message_id'],
            type = self.message_type
        ))

        self.sender_information = self._get_sender_information()
        self.plugins = self._find_applicable_plugins()

        return
dataset/ETHPy150Open leonjza/hogar/hogar/ResponseHandler.py/Response.__init__/swapped operands of `in`