def delete(self, key_path, write_wsconf=True):
        if key_path in ".":
            _parts = key_path.split(".")
            _parent = ".".join(_parts[:-1])
            _delkey = _parts[-1]

            # del from current session
            del self.get(_parent)[_delkey]

            # del from workspace
            _tmpwsd = self._wsdata
            for k in _parent.split("."):
                _tmpwsd = _tmpwsd[k]
            del _tmpwsd[_delkey]
        else:
            del self._data[key_path]
            del self._wsdata[key_path]

        if write_wsconf:
            self._write_wsconf()
dataset/ETHPy150Open smartanthill/smartanthill1_0/smartanthill/configprocessor.py/ConfigProcessor.delete/swapped operands of `in`