def METHOD_NAME(self, key: str, val: int | float | str):
    if key in self.settings.intData:
        val = int(val)
        setattr(self.settings, key, val)
        if key == "gpu":
            self.initialize()
    elif key in self.settings.floatData:
        setattr(self.settings, key, float(val))
    elif key in self.settings.strData:
        setattr(self.settings, key, str(val))
    else:
        return False
    return True