def setData(self, key, value, overwrite=False):
        """
            write the key value pair to the data base
            
            if the key already exists, overwrite must be
            set True in oder to update the data for
            that key in the database 
        """
        self.need_open()
        
        if overwrite:
            if self.verbose > 1:
                print("overwrite True: del key")
            if key in self.db:
                self.__delitem__(key)         
         
        if not key in self.db:
            if _NP and isinstance(value, np.ndarray):
                if self.verbose > 1:
                    print("set nparray")
                return self._setNPA(key, nparray=value)
            else:
                if self.verbose > 1:
                    print("set normal value")
                self.db[key] = value
                self.db.commit()
                return True
        else:
            if overwrite:
                raise RuntimeError("this can not happen -> if so, pls check code!")
            raise KeyError("could not set data, key exists, and overwrite is False")
dataset/ETHPy150Open cimatosa/jobmanager/jobmanager/persistentData.py/PersistentDataStructure.setData/original