def create(self, **kwargs):
        """Create a resource based on a kwargs dictionary of attributes.

        :param kwargs: A dictionary containing the attributes of the resource
                       that will be created.
        :raises exc.InvalidAttribute: For invalid attributes that are not
                                      needed to create the resource.
        """

        new = {}
        for (key, value) in kwargs.items():
            if self._creation_attributes in key:
                new[key] = value
            else:
                raise exc.InvalidAttribute()
        url = self._path()
        resp, body = self.api.json_request('POST', url, body=new)
        if body:
            return self.resource_class(self, body)
dataset/ETHPy150Open openstack/python-ironicclient/ironicclient/common/base.py/CreateManager.create/swapped operands of `in`