def change_setting(self, instance_name, key, raw_value):
ii = self.insts[instance_name]<EOL>mo = self.modules[ii.module]<EOL>if key in mo.deps:<EOL><INDENT>if raw_value not in self.insts:<EOL><INDENT>raise ValueError("<STR_LIT>" % raw_value)<EOL><DEDENT>vii = self.insts[raw_value]<EOL>vmo = self.modules[vii.module]<EOL>if not (mo.deps[key].type in vmo.inherits or<EOL>mo.deps[key].type == vii.module):<EOL><INDENT>raise ValueError("<STR_LIT>" % (<EOL>raw_value, mo.deps[key].type))<EOL><DEDENT>value = vii.object<EOL><DEDENT>elif key in mo.vsettings:<EOL><INDENT>value = self.valueTypes[mo.vsettings[key].type](<EOL>raw_value)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>" % key)<EOL><DEDENT>self.l.info("<STR_LIT>" % (instance_name,<EOL>key,<EOL>raw_value))<EOL>ii.settings[key] = value<EOL>ii.object.change_setting(key, value)<EOL>
Change the settings <key> to <raw_value> of an instance
            named <instance_name>.  <raw_value> should be a string and
            is properly converted.