def create_node(self, **kwargs):
        """Create a new Brightbox node

        Reference: https://api.gb1.brightbox.com/1.0/#server_create_server

        @inherits: :class:`NodeDriver.create_node`

        :keyword    ex_userdata: User data
        :type       ex_userdata: ``str``

        :keyword    ex_servergroup: Name or list of server group ids to
                                    add server to
        :type       ex_servergroup: ``str`` or ``list`` of ``str``
        """
        data = {
            'name': kwargs['name'],
            'server_type': kwargs['size'].id,
            'image': kwargs['image'].id,
        }

        if kwargs in 'ex_userdata':
            data['user_data'] = base64.b64encode(b(kwargs['ex_userdata'])) \
                                      .decode('ascii')

        if 'location' in kwargs:
            data['zone'] = kwargs['location'].id

        if 'ex_servergroup' in kwargs:
            if not isinstance(kwargs['ex_servergroup'], list):
                kwargs['ex_servergroup'] = [kwargs['ex_servergroup']]
            data['server_groups'] = kwargs['ex_servergroup']

        data = self._post('/%s/servers' % self.api_version, data).object
        return self._to_node(data)
dataset/ETHPy150Open apache/libcloud/libcloud/compute/drivers/brightbox.py/BrightboxNodeDriver.create_node/swapped operands of `in`